Task #132922 - added.err
back to task #132922download
Error: GCC_ANALYZER_WARNING (CWE-401): tomcat-native-2.0.15-src/native/src/sslcontext.c:1268:17: warning[-Wanalyzer-malloc-leak]: leak of 'p_data' tomcat-native-2.0.15-src/native/src/sslcontext.c:1225:8: branch_false: following 'false' branch (when 'protos' is non-NULL)... tomcat-native-2.0.15-src/native/src/sslcontext.c:1230:11: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1232:8: branch_false: following 'false' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1237:32: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1237:32: acquire_memory: allocated here tomcat-native-2.0.15-src/native/src/sslcontext.c:1238:8: branch_false: following 'false' branch (when 'p_data' is non-NULL)... tomcat-native-2.0.15-src/native/src/sslcontext.c:1238:8: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1243:17: branch_true: following 'true' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1244:35: branch_true: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1248:13: branch_true: following 'true' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1252:24: branch_true: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1253:16: branch_true: following 'true' branch (when 'p_data_size < p_data_len')... tomcat-native-2.0.15-src/native/src/sslcontext.c:1255:54: branch_true: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1260:20: branch_false: following 'false' branch (when 'p_data_tmp' is non-NULL)... tomcat-native-2.0.15-src/native/src/sslcontext.c:1268:39: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1243:17: branch_false: following 'false' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1281:8: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1281:8: branch_false: following 'false' branch (when 'p_data' is non-NULL)... tomcat-native-2.0.15-src/native/src/sslcontext.c:1286:13: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1286:12: branch_false: following 'false' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1291:16: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1268:17: danger: 'p_data' leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4) # 1266| } # 1267| // Set position in buffer as realloc may have moved the buffer # 1268|-> p_data = p_data_tmp + (p_data_len - (1 + proto_chars_len)); # 1269| } # 1270| // Write the length of the protocol and then increment before memcpy the protocol itself. Error: GCC_ANALYZER_WARNING (CWE-401): tomcat-native-2.0.15-src/native/src/sslcontext.c:1296:1: warning[-Wanalyzer-malloc-leak]: leak of 'p_data_tmp' tomcat-native-2.0.15-src/native/src/sslcontext.c:1225:8: branch_false: following 'false' branch (when 'protos' is non-NULL)... tomcat-native-2.0.15-src/native/src/sslcontext.c:1230:11: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1232:8: branch_false: following 'false' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1237:32: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1238:8: branch_false: following 'false' branch (when 'p_data' is non-NULL)... tomcat-native-2.0.15-src/native/src/sslcontext.c:1238:8: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1243:17: branch_true: following 'true' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1244:35: branch_true: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1248:13: branch_true: following 'true' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1252:24: branch_true: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1253:16: branch_true: following 'true' branch (when 'p_data_size < p_data_len')... tomcat-native-2.0.15-src/native/src/sslcontext.c:1255:54: branch_true: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1260:20: branch_false: following 'false' branch (when 'p_data_tmp' is non-NULL)... tomcat-native-2.0.15-src/native/src/sslcontext.c:1268:39: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1243:17: branch_true: following 'true' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1244:35: branch_true: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1248:13: branch_true: following 'true' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1252:24: branch_true: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1253:16: branch_false: following 'false' branch (when 'p_data_size >= p_data_len')... tomcat-native-2.0.15-src/native/src/sslcontext.c:1271:13: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1243:17: branch_false: following 'false' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1281:8: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1286:12: branch_false: following 'false' branch... tomcat-native-2.0.15-src/native/src/sslcontext.c:1291:16: branch_false: ...to here tomcat-native-2.0.15-src/native/src/sslcontext.c:1296:1: danger: 'p_data_tmp' leaks here; was allocated at [(13)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/12) # 1294| return 0; # 1295| } # 1296|-> } # 1297| # 1298| TCN_IMPLEMENT_CALL(void, SSLContext, setAlpnProtos)(TCN_STDARGS, jlong ctx, jobjectArray alpn_protos,