Task #52604 - fixed.err
back to task #52604download
Error: COMPILER_WARNING:
tomcat-native-1.3.0-src/native/os/unix/system.c: scope_hint: In function 'Java_org_apache_tomcat_jni_OS_syslog'
tomcat-native-1.3.0-src/native/os/unix/system.c:437:18: warning[-Wformat-overflow=]: '%s' directive argument is null
# 437 | syslog (id, "%s", J2S(msg));
# | ^~
# 435| break;
# 436| }
# 437|-> syslog (id, "%s", J2S(msg));
# 438|
# 439| TCN_FREE_CSTRING(msg);
Error: GCC_ANALYZER_WARNING (CWE-688):
tomcat-native-1.3.0-src/native/src/network.c:434:5: warning[-Wanalyzer-null-argument]: use of NULL 'p' where non-null expected
tomcat-native-1.3.0-src/native/src/network.c:401:19: release_memory: 'p' is NULL
tomcat-native-1.3.0-src/native/src/network.c:408:5: branch_true: following 'true' branch...
tomcat-native-1.3.0-src/native/src/network.c:408:5: branch_true: ...to here
tomcat-native-1.3.0-src/native/src/network.c:408:5: release_memory: 'p' is NULL
tomcat-native-1.3.0-src/native/src/network.c:434:5: release_memory: 'p' is NULL
tomcat-native-1.3.0-src/native/src/network.c:434:5: danger: argument 1 ('p') NULL where non-null expected
# 432| cleanup:
# 433| TCN_ASSERT(p != 0);
# 434|-> apr_pool_destroy(p);
# 435| return 0;
# 436| }
Error: GCC_ANALYZER_WARNING (CWE-688):
tomcat-native-1.3.0-src/native/src/pool.c:208:9: warning[-Wanalyzer-null-argument]: use of NULL 'ckey' where non-null expected
tomcat-native-1.3.0-src/native/src/pool.c:202:5: branch_false: following 'false' branch (when 'key' is NULL)...
tomcat-native-1.3.0-src/native/src/pool.c:208:9: branch_false: ...to here
tomcat-native-1.3.0-src/native/src/pool.c:208:9: danger: argument 2 ('ckey') NULL where non-null expected
# 206| TCN_ASSERT(key != 0);
# 207|
# 208|-> if (apr_pool_userdata_get(&old, J2S(key), p) == APR_SUCCESS) {
# 209| if (old)
# 210| apr_pool_cleanup_run(p, old, generic_pool_data_cleanup);
Error: GCC_ANALYZER_WARNING (CWE-476):
tomcat-native-1.3.0-src/native/src/pool.c:216:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'cb'
tomcat-native-1.3.0-src/native/src/pool.c:202:5: branch_true: following 'true' branch (when 'key' is non-NULL)...
tomcat-native-1.3.0-src/native/src/pool.c:202:5: branch_true: ...to here
tomcat-native-1.3.0-src/native/src/pool.c:212:8: branch_true: following 'true' branch (when 'data' is non-NULL)...
tomcat-native-1.3.0-src/native/src/pool.c:214:48: branch_true: ...to here
tomcat-native-1.3.0-src/native/src/pool.c:214:48: acquire_memory: this call could return NULL
tomcat-native-1.3.0-src/native/src/pool.c:216:9: danger: 'cb' could be NULL: unchecked value from [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 214| tcn_callback_t *cb = (tcn_callback_t *)malloc(sizeof(tcn_callback_t));
# 215| tcn_get_java_env(&e);
# 216|-> cb->obj = (*e)->NewGlobalRef(e, data);
# 217| if ((rv = apr_pool_userdata_set(cb, J2S(key), generic_pool_data_cleanup,
# 218| p)) != APR_SUCCESS) {
Error: GCC_ANALYZER_WARNING (CWE-401):
tomcat-native-1.3.0-src/native/src/pool.c:228:12: warning[-Wanalyzer-malloc-leak]: leak of 'cb'
tomcat-native-1.3.0-src/native/src/pool.c:202:5: branch_true: following 'true' branch (when 'key' is non-NULL)...
tomcat-native-1.3.0-src/native/src/pool.c:202:5: branch_true: ...to here
tomcat-native-1.3.0-src/native/src/pool.c:212:8: branch_true: following 'true' branch (when 'data' is non-NULL)...
tomcat-native-1.3.0-src/native/src/pool.c:214:48: branch_true: ...to here
tomcat-native-1.3.0-src/native/src/pool.c:214:48: acquire_memory: allocated here
tomcat-native-1.3.0-src/native/src/pool.c:217:12: branch_false: following 'false' branch...
<unknown>: branch_false: ...to here
tomcat-native-1.3.0-src/native/src/pool.c:228:12: danger: 'cb' leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 226| }
# 227| TCN_FREE_CSTRING(key);
# 228|-> return rv;
# 229| }
# 230|
Error: GCC_ANALYZER_WARNING (CWE-688):
tomcat-native-1.3.0-src/native/src/pool.c:243:9: warning[-Wanalyzer-null-argument]: use of NULL 'ckey' where non-null expected
tomcat-native-1.3.0-src/native/src/pool.c:236:5: branch_false: following 'false' branch (when 'key' is NULL)...
tomcat-native-1.3.0-src/native/src/pool.c:243:9: branch_false: ...to here
tomcat-native-1.3.0-src/native/src/pool.c:243:9: danger: argument 2 ('ckey') NULL where non-null expected
# 241| TCN_ASSERT(key != 0);
# 242|
# 243|-> if (apr_pool_userdata_get(&old, J2S(key), p) == APR_SUCCESS) {
# 244| if (old) {
# 245| tcn_callback_t *cb = (tcn_callback_t *)old;
Error: GCC_ANALYZER_WARNING (CWE-401):
tomcat-native-1.3.0-src/native/src/proc.c:388:5: warning[-Wanalyzer-malloc-leak]: leak of 'cb'
tomcat-native-1.3.0-src/native/src/proc.c:375:44: acquire_memory: allocated here
tomcat-native-1.3.0-src/native/src/proc.c:380:8: branch_false: following 'false' branch (when 'cb' is non-NULL)...
tomcat-native-1.3.0-src/native/src/proc.c:383:11: branch_false: ...to here
tomcat-native-1.3.0-src/native/src/proc.c:388:5: danger: 'cb' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 386|
# 387| apr_pool_userdata_setn(cb, ERRFN_USERDATA_KEY, child_errfn_pool_cleanup, p);
# 388|-> apr_procattr_child_errfn_set(a, generic_child_errfn);
# 389|
# 390| }