From 9fdfbf64cbf8c8ff71b145c022e754d7ffece94c Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Fri, 22 Jan 2010 12:48:11 +0200 Subject: [PATCH] Ticket #1973: Segfault in 'Listing mode' dialog Test case: * run mc * Select F9 => 'Left/Right' => 'Listing mode...' * [x] user Mini status * enter below: 'half type name | size+ | perm' * Press [< OK >] button Fix issue: alloc new block of memory with initialization (filled by zero) Signed-off-by: Slava Zanko --- src/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index 6abfac65d..3bf6d6beb 100644 --- a/src/screen.c +++ b/src/screen.c @@ -1526,7 +1526,7 @@ parse_display_format (WPanel *panel, const char *format, char **error, int issta while (*format){ /* format can be an empty string */ int found = 0; - darr = g_new (format_e, 1); + darr = g_new0 (format_e, 1); /* I'm so ugly, don't look at me :-) */ if (!home)