Skip to content

Commit 7bf13fe

Browse files
committed
Ticket #4717: mcedit: fix segfault at open Syntax file.
How to reproduce: Start mcedit and go to Options -> Syntax file. Actual behavior: Segfault. * (file_error): pass second file name as an empty string intead of NULL to files_error() to avoid NULL dereference in str_utf8_trunc(), str_8bit_trunc(), and str_ascii_trunc(). Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
1 parent f9ef906 commit 7bf13fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/filemanager/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3731,7 +3731,7 @@ panel_operate (void *source_panel, FileOperation operation, gboolean force_singl
37313731
FileProgressStatus
37323732
file_error (file_op_context_t *ctx, gboolean allow_retry, const char *format, const char *file)
37333733
{
3734-
return files_error (ctx, allow_retry, format, file, NULL);
3734+
return files_error (ctx, allow_retry, format, file, "");
37353735
}
37363736

37373737
/* --------------------------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)