Skip to content

Commit 242dda6

Browse files
Hiroshi Yoshikawaooxi
authored andcommitted
Crash may occur on opening/saveing files
This is caused by passing NULL to strchr() function. Behavior of strchr(NULL, c) is implementation-dependent. Indeed, MinGW-w64 gcc crashes if strchr(NULL, c) is executed. https://sourceforge.net/p/gerbv/patches/83/
1 parent c03a2ec commit 242dda6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/project.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,8 @@ get_value_string(scheme *sc, pointer value)
564564
static char *
565565
convert_path_separators(char* path, int conv_flag)
566566
{
567+
if (path == NULL) return NULL;
568+
567569
#if defined (__MINGW32__)
568570
char *hit_in_path;
569571

0 commit comments

Comments
 (0)