Skip to content

Commit

Permalink
Crash may occur on opening/saveing files
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
Hiroshi Yoshikawa authored and ooxi committed Aug 29, 2021
1 parent c03a2ec commit 242dda6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/project.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ get_value_string(scheme *sc, pointer value)
static char *
convert_path_separators(char* path, int conv_flag)
{
if (path == NULL) return NULL;

#if defined (__MINGW32__)
char *hit_in_path;

Expand Down

0 comments on commit 242dda6

Please sign in to comment.