E3-1197: Fix possible memory issues
Compare changes
- Lucas Magalhães authored
In function ‘compareVersions’, inlined from ‘require_priv’ at .././src/require.c:1025:29: .././src/require.c:640:9: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 640 | debug("require: compareVersions(found=%s, request=%s)\n", found, request); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .././src/require.c:601:28: note: in definition of macro ‘debug’ 601 | if (requireDebug) printf(__VA_ARGS__) | ^~~~~~~~~~~ .././src/require.c: In function ‘require_priv’: .././src/require.c:640:53: note: format string is defined here 640 | debug("require: compareVersions(found=%s, request=%s)\n", found, request); | ^~ In function ‘compareVersions’, inlined from ‘require_priv’ at .././src/require.c:1025:29: .././src/require.c:640:9: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 640 | debug("require: compareVersions(found=%s, request=%s)\n", found, request); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .././src/require.c:601:28: note: in definition of macro ‘debug’ 601 | if (requireDebug) printf(__VA_ARGS__) | ^~~~~~~~~~~ .././src/require.c: In function ‘require_priv’: .././src/require.c:640:53: note: format string is defined here 640 | debug("require: compareVersions(found=%s, request=%s)\n", found, request); | ^~ .././src/require.c:1031:50: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 1031 | printf("require: %s %s may match %s\n", module, currentFilename, | ^~
+ 4
− 3
@@ -637,7 +637,8 @@ static int compareVersions(const char *found, const char *request,
@@ -637,7 +637,8 @@ static int compareVersions(const char *found, const char *request,
@@ -1020,7 +1021,7 @@ static int require_priv(
@@ -1020,7 +1021,7 @@ static int require_priv(
@@ -1029,7 +1030,7 @@ static int require_priv(
@@ -1029,7 +1030,7 @@ static int require_priv(