Error: CPPCHECK_WARNING (CWE-682): [#def1] libyuv-0/source/convert.cc:795: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 793| // Allocate u and v buffers # 794| align_buffer_64(plane_u, halfwidth * halfheight * 2); # 795|-> uint8_t* plane_v = plane_u + halfwidth * halfheight; # 796| if (!plane_u) # 797| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def2] libyuv-0/source/convert.cc:797: error[memleak]: Memory leak: plane_u_mem # 795| uint8_t* plane_v = plane_u + halfwidth * halfheight; # 796| if (!plane_u) # 797|-> return 1; # 798| # 799| I422ToI420(src_y, src_stride_y, src_u, src_stride_u, src_v, src_stride_v, Error: CPPCHECK_WARNING (CWE-401): [#def3] libyuv-0/source/convert.cc:914: error[memleak]: Memory leak: row_buf_mem # 912| align_buffer_64(row_buf, row_buf_size); # 913| if (!row_buf) # 914|-> return 1; # 915| # 916| #if defined(HAS_UNPACKMT2T_NEON) Error: CPPCHECK_WARNING (CWE-401): [#def4] libyuv-0/source/convert.cc:2798: error[memleak]: Memory leak: row_mem # 2796| align_buffer_64(row, row_size * 2); # 2797| if (!row) # 2798|-> return 1; # 2799| #endif # 2800| Error: CPPCHECK_WARNING (CWE-401): [#def5] libyuv-0/source/convert.cc:2976: error[memleak]: Memory leak: row_mem # 2974| align_buffer_64(row, row_size * 2); # 2975| if (!row) # 2976|-> return 1; # 2977| #endif # 2978| Error: CPPCHECK_WARNING (CWE-401): [#def6] libyuv-0/source/convert.cc:3157: error[memleak]: Memory leak: row_mem # 3155| align_buffer_64(row, row_size * 2); # 3156| if (!row) # 3157|-> return 1; # 3158| #endif # 3159| Error: CPPCHECK_WARNING (CWE-401): [#def7] libyuv-0/source/convert.cc:3335: error[memleak]: Memory leak: row_mem # 3333| align_buffer_64(row, row_size * 2); # 3334| if (!row) # 3335|-> return 1; # 3336| #endif # 3337| Error: CPPCHECK_WARNING (CWE-401): [#def8] libyuv-0/source/convert.cc:3515: error[memleak]: Memory leak: row_mem # 3513| align_buffer_64(row, row_size * 2); # 3514| if (!row) # 3515|-> return 1; # 3516| #endif # 3517| for (y = 0; y < height - 1; y += 2) { Error: CPPCHECK_WARNING (CWE-401): [#def9] libyuv-0/source/convert.cc:3697: error[memleak]: Memory leak: row_mem # 3695| align_buffer_64(row, row_size * 2); # 3696| if (!row) # 3697|-> return 1; # 3698| #endif # 3699| Error: CPPCHECK_WARNING (CWE-401): [#def10] libyuv-0/source/convert.cc:3912: error[memleak]: Memory leak: row_mem # 3910| align_buffer_64(row, row_size * 2); # 3911| if (!row) # 3912|-> return 1; # 3913| #endif # 3914| Error: CPPCHECK_WARNING (CWE-401): [#def11] libyuv-0/source/convert_argb.cc:4805: error[memleak]: Memory leak: plane_uv_mem # 4803| align_buffer_64(plane_uv, halfwidth * 2 * halfheight); # 4804| if (!plane_uv) # 4805|-> return 1; # 4806| dst_uv = plane_uv; # 4807| for (y = 0; y < halfheight; ++y) { Error: CPPCHECK_WARNING (CWE-401): [#def12] libyuv-0/source/convert_argb.cc:6139: error[memleak]: Memory leak: row_argb_mem # 6137| align_buffer_64(row_argb, width * 4); # 6138| if (!row_argb) # 6139|-> return 1; # 6140| for (y = 0; y < height; ++y) { # 6141| I422ToARGBRow(src_y, src_u, src_v, row_argb, &kYuvI601Constants, width); Error: CPPCHECK_WARNING (CWE-682): [#def13] libyuv-0/source/convert_argb.cc:6404: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6402| align_buffer_64(row, row_size * 4); # 6403| uint8_t* temp_u_1 = row; # 6404|-> uint8_t* temp_u_2 = row + row_size; # 6405| uint8_t* temp_v_1 = row + row_size * 2; # 6406| uint8_t* temp_v_2 = row + row_size * 3; Error: CPPCHECK_WARNING (CWE-682): [#def14] libyuv-0/source/convert_argb.cc:6405: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6403| uint8_t* temp_u_1 = row; # 6404| uint8_t* temp_u_2 = row + row_size; # 6405|-> uint8_t* temp_v_1 = row + row_size * 2; # 6406| uint8_t* temp_v_2 = row + row_size * 3; # 6407| if (!row) Error: CPPCHECK_WARNING (CWE-682): [#def15] libyuv-0/source/convert_argb.cc:6406: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6404| uint8_t* temp_u_2 = row + row_size; # 6405| uint8_t* temp_v_1 = row + row_size * 2; # 6406|-> uint8_t* temp_v_2 = row + row_size * 3; # 6407| if (!row) # 6408| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def16] libyuv-0/source/convert_argb.cc:6408: error[memleak]: Memory leak: row_mem # 6406| uint8_t* temp_v_2 = row + row_size * 3; # 6407| if (!row) # 6408|-> return 1; # 6409| # 6410| ScaleRowUp2_Linear(src_u, temp_u_1, width); Error: CPPCHECK_WARNING (CWE-682): [#def17] libyuv-0/source/convert_argb.cc:6547: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6545| align_buffer_64(row, row_size * 2); # 6546| uint8_t* temp_u = row; # 6547|-> uint8_t* temp_v = row + row_size; # 6548| if (!row) # 6549| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def18] libyuv-0/source/convert_argb.cc:6549: error[memleak]: Memory leak: row_mem # 6547| uint8_t* temp_v = row + row_size; # 6548| if (!row) # 6549|-> return 1; # 6550| # 6551| for (y = 0; y < height; ++y) { Error: CPPCHECK_WARNING (CWE-682): [#def19] libyuv-0/source/convert_argb.cc:6680: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6678| align_buffer_64(row, row_size * 4); # 6679| uint8_t* temp_u_1 = row; # 6680|-> uint8_t* temp_u_2 = row + row_size; # 6681| uint8_t* temp_v_1 = row + row_size * 2; # 6682| uint8_t* temp_v_2 = row + row_size * 3; Error: CPPCHECK_WARNING (CWE-682): [#def20] libyuv-0/source/convert_argb.cc:6681: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6679| uint8_t* temp_u_1 = row; # 6680| uint8_t* temp_u_2 = row + row_size; # 6681|-> uint8_t* temp_v_1 = row + row_size * 2; # 6682| uint8_t* temp_v_2 = row + row_size * 3; # 6683| if (!row) Error: CPPCHECK_WARNING (CWE-682): [#def21] libyuv-0/source/convert_argb.cc:6682: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6680| uint8_t* temp_u_2 = row + row_size; # 6681| uint8_t* temp_v_1 = row + row_size * 2; # 6682|-> uint8_t* temp_v_2 = row + row_size * 3; # 6683| if (!row) # 6684| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def22] libyuv-0/source/convert_argb.cc:6684: error[memleak]: Memory leak: row_mem # 6682| uint8_t* temp_v_2 = row + row_size * 3; # 6683| if (!row) # 6684|-> return 1; # 6685| # 6686| ScaleRowUp2_Linear(src_u, temp_u_1, width); Error: CPPCHECK_WARNING (CWE-682): [#def23] libyuv-0/source/convert_argb.cc:6796: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6794| align_buffer_64(row, row_size * 4 * sizeof(uint16_t)); # 6795| uint16_t* temp_u_1 = (uint16_t*)(row); # 6796|-> uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; # 6797| uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; # 6798| uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; Error: CPPCHECK_WARNING (CWE-682): [#def24] libyuv-0/source/convert_argb.cc:6797: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6795| uint16_t* temp_u_1 = (uint16_t*)(row); # 6796| uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; # 6797|-> uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; # 6798| uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; # 6799| if (!row) Error: CPPCHECK_WARNING (CWE-682): [#def25] libyuv-0/source/convert_argb.cc:6798: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6796| uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; # 6797| uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; # 6798|-> uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; # 6799| if (!row) # 6800| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def26] libyuv-0/source/convert_argb.cc:6800: error[memleak]: Memory leak: row_mem # 6798| uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; # 6799| if (!row) # 6800|-> return 1; # 6801| # 6802| ScaleRowUp2_Linear_12(src_u, temp_u_1, width); Error: CPPCHECK_WARNING (CWE-682): [#def27] libyuv-0/source/convert_argb.cc:6905: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 6903| align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); # 6904| uint16_t* temp_u = (uint16_t*)(row); # 6905|-> uint16_t* temp_v = (uint16_t*)(row) + row_size; # 6906| if (!row) # 6907| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def28] libyuv-0/source/convert_argb.cc:6907: error[memleak]: Memory leak: row_mem # 6905| uint16_t* temp_v = (uint16_t*)(row) + row_size; # 6906| if (!row) # 6907|-> return 1; # 6908| # 6909| for (y = 0; y < height; ++y) { Error: CPPCHECK_WARNING (CWE-682): [#def29] libyuv-0/source/convert_argb.cc:7003: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7001| align_buffer_64(row, row_size * 4 * sizeof(uint16_t)); # 7002| uint16_t* temp_u_1 = (uint16_t*)(row); # 7003|-> uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; # 7004| uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; # 7005| uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; Error: CPPCHECK_WARNING (CWE-682): [#def30] libyuv-0/source/convert_argb.cc:7004: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7002| uint16_t* temp_u_1 = (uint16_t*)(row); # 7003| uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; # 7004|-> uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; # 7005| uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; # 7006| if (!row) Error: CPPCHECK_WARNING (CWE-682): [#def31] libyuv-0/source/convert_argb.cc:7005: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7003| uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; # 7004| uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; # 7005|-> uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; # 7006| if (!row) # 7007| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def32] libyuv-0/source/convert_argb.cc:7007: error[memleak]: Memory leak: row_mem # 7005| uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; # 7006| if (!row) # 7007|-> return 1; # 7008| # 7009| ScaleRowUp2_Linear_12(src_u, temp_u_1, width); Error: CPPCHECK_WARNING (CWE-682): [#def33] libyuv-0/source/convert_argb.cc:7111: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7109| align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); # 7110| uint16_t* temp_u = (uint16_t*)(row); # 7111|-> uint16_t* temp_v = (uint16_t*)(row) + row_size; # 7112| if (!row) # 7113| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def34] libyuv-0/source/convert_argb.cc:7113: error[memleak]: Memory leak: row_mem # 7111| uint16_t* temp_v = (uint16_t*)(row) + row_size; # 7112| if (!row) # 7113|-> return 1; # 7114| # 7115| for (y = 0; y < height; ++y) { Error: CPPCHECK_WARNING (CWE-682): [#def35] libyuv-0/source/convert_argb.cc:7294: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7292| align_buffer_64(row, row_size * 4); # 7293| uint8_t* temp_u_1 = row; # 7294|-> uint8_t* temp_u_2 = row + row_size; # 7295| uint8_t* temp_v_1 = row + row_size * 2; # 7296| uint8_t* temp_v_2 = row + row_size * 3; Error: CPPCHECK_WARNING (CWE-682): [#def36] libyuv-0/source/convert_argb.cc:7295: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7293| uint8_t* temp_u_1 = row; # 7294| uint8_t* temp_u_2 = row + row_size; # 7295|-> uint8_t* temp_v_1 = row + row_size * 2; # 7296| uint8_t* temp_v_2 = row + row_size * 3; # 7297| if (!row) Error: CPPCHECK_WARNING (CWE-682): [#def37] libyuv-0/source/convert_argb.cc:7296: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7294| uint8_t* temp_u_2 = row + row_size; # 7295| uint8_t* temp_v_1 = row + row_size * 2; # 7296|-> uint8_t* temp_v_2 = row + row_size * 3; # 7297| if (!row) # 7298| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def38] libyuv-0/source/convert_argb.cc:7298: error[memleak]: Memory leak: row_mem # 7296| uint8_t* temp_v_2 = row + row_size * 3; # 7297| if (!row) # 7298|-> return 1; # 7299| # 7300| ScaleRowUp2_Linear(src_u, temp_u_1, width); Error: CPPCHECK_WARNING (CWE-682): [#def39] libyuv-0/source/convert_argb.cc:7501: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7499| align_buffer_64(row, row_size * 2); # 7500| uint8_t* temp_u = row; # 7501|-> uint8_t* temp_v = row + row_size; # 7502| if (!row) # 7503| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def40] libyuv-0/source/convert_argb.cc:7503: error[memleak]: Memory leak: row_mem # 7501| uint8_t* temp_v = row + row_size; # 7502| if (!row) # 7503|-> return 1; # 7504| # 7505| for (y = 0; y < height; ++y) { Error: CPPCHECK_WARNING (CWE-682): [#def41] libyuv-0/source/convert_argb.cc:7650: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7648| align_buffer_64(row, row_size * 4 * sizeof(uint16_t)); # 7649| uint16_t* temp_u_1 = (uint16_t*)(row); # 7650|-> uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; # 7651| uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; # 7652| uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; Error: CPPCHECK_WARNING (CWE-682): [#def42] libyuv-0/source/convert_argb.cc:7651: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7649| uint16_t* temp_u_1 = (uint16_t*)(row); # 7650| uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; # 7651|-> uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; # 7652| uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; # 7653| if (!row) Error: CPPCHECK_WARNING (CWE-682): [#def43] libyuv-0/source/convert_argb.cc:7652: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7650| uint16_t* temp_u_2 = (uint16_t*)(row) + row_size; # 7651| uint16_t* temp_v_1 = (uint16_t*)(row) + row_size * 2; # 7652|-> uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; # 7653| if (!row) # 7654| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def44] libyuv-0/source/convert_argb.cc:7654: error[memleak]: Memory leak: row_mem # 7652| uint16_t* temp_v_2 = (uint16_t*)(row) + row_size * 3; # 7653| if (!row) # 7654|-> return 1; # 7655| # 7656| ScaleRowUp2_Linear_12(src_u, temp_u_1, width); Error: CPPCHECK_WARNING (CWE-682): [#def45] libyuv-0/source/convert_argb.cc:7821: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7819| align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); # 7820| uint16_t* temp_u = (uint16_t*)(row); # 7821|-> uint16_t* temp_v = (uint16_t*)(row) + row_size; # 7822| if (!row) # 7823| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def46] libyuv-0/source/convert_argb.cc:7823: error[memleak]: Memory leak: row_mem # 7821| uint16_t* temp_v = (uint16_t*)(row) + row_size; # 7822| if (!row) # 7823|-> return 1; # 7824| # 7825| for (y = 0; y < height; ++y) { Error: CPPCHECK_WARNING (CWE-682): [#def47] libyuv-0/source/convert_argb.cc:7908: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 7906| align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); # 7907| uint16_t* temp_uv_1 = (uint16_t*)(row); # 7908|-> uint16_t* temp_uv_2 = (uint16_t*)(row) + row_size; # 7909| if (!row) # 7910| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def48] libyuv-0/source/convert_argb.cc:7910: error[memleak]: Memory leak: row_mem # 7908| uint16_t* temp_uv_2 = (uint16_t*)(row) + row_size; # 7909| if (!row) # 7910|-> return 1; # 7911| # 7912| Scale2RowUp_Bilinear_16(src_uv, 0, temp_uv_1, row_size, width); Error: CPPCHECK_WARNING (CWE-401): [#def49] libyuv-0/source/convert_argb.cc:8001: error[memleak]: Memory leak: row_mem # 7999| uint16_t* temp_uv = (uint16_t*)(row); # 8000| if (!row) # 8001|-> return 1; # 8002| # 8003| for (y = 0; y < height; ++y) { Error: CPPCHECK_WARNING (CWE-682): [#def50] libyuv-0/source/convert_argb.cc:8080: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 8078| align_buffer_64(row, row_size * 2 * sizeof(uint16_t)); # 8079| uint16_t* temp_uv_1 = (uint16_t*)(row); # 8080|-> uint16_t* temp_uv_2 = (uint16_t*)(row) + row_size; # 8081| if (!row) # 8082| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def51] libyuv-0/source/convert_argb.cc:8082: error[memleak]: Memory leak: row_mem # 8080| uint16_t* temp_uv_2 = (uint16_t*)(row) + row_size; # 8081| if (!row) # 8082|-> return 1; # 8083| # 8084| Scale2RowUp_Bilinear_16(src_uv, 0, temp_uv_1, row_size, width); Error: CPPCHECK_WARNING (CWE-401): [#def52] libyuv-0/source/convert_argb.cc:8173: error[memleak]: Memory leak: row_mem # 8171| uint16_t* temp_uv = (uint16_t*)(row); # 8172| if (!row) # 8173|-> return 1; # 8174| # 8175| for (y = 0; y < height; ++y) { Error: CPPCHECK_WARNING (CWE-682): [#def53] libyuv-0/source/convert_argb.cc:8274: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 8272| align_buffer_64(row, row_size * 2); # 8273| uint8_t* temp_u = row; # 8274|-> uint8_t* temp_v = row + row_size; # 8275| if (!row) # 8276| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def54] libyuv-0/source/convert_argb.cc:8276: error[memleak]: Memory leak: row_mem # 8274| uint8_t* temp_v = row + row_size; # 8275| if (!row) # 8276|-> return 1; # 8277| # 8278| for (y = 0; y < height; ++y) { Error: CPPCHECK_WARNING (CWE-682): [#def55] libyuv-0/source/convert_from_argb.cc:505: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 503| // Allocate a rows of uv. # 504| align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); # 505|-> uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); # 506| if (!row_u) # 507| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def56] libyuv-0/source/convert_from_argb.cc:507: error[memleak]: Memory leak: row_u_mem # 505| uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); # 506| if (!row_u) # 507|-> return 1; # 508| # 509| for (y = 0; y < height - 1; y += 2) { Error: CPPCHECK_WARNING (CWE-682): [#def57] libyuv-0/source/convert_from_argb.cc:721: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 719| // Allocate a rows of uv. # 720| align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); # 721|-> uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); # 722| if (!row_u) # 723| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def58] libyuv-0/source/convert_from_argb.cc:723: error[memleak]: Memory leak: row_u_mem # 721| uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); # 722| if (!row_u) # 723|-> return 1; # 724| # 725| for (y = 0; y < height - 1; y += 2) { Error: CPPCHECK_WARNING (CWE-682): [#def59] libyuv-0/source/convert_from_argb.cc:924: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 922| // Allocate a rows of uv. # 923| align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); # 924|-> uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); # 925| if (!row_u) # 926| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def60] libyuv-0/source/convert_from_argb.cc:926: error[memleak]: Memory leak: row_u_mem # 924| uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); # 925| if (!row_u) # 926|-> return 1; # 927| # 928| for (y = 0; y < height - 1; y += 2) { Error: CPPCHECK_WARNING (CWE-682): [#def61] libyuv-0/source/convert_from_argb.cc:1128: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 1126| // Allocate a rows of uv. # 1127| align_buffer_64(row_u, ((halfwidth + 31) & ~31) * 2); # 1128|-> uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); # 1129| if (!row_u) # 1130| return 1; Error: CPPCHECK_WARNING (CWE-401): [#def62] libyuv-0/source/convert_from_argb.cc:1130: error[memleak]: Memory leak: row_u_mem # 1128| uint8_t* row_v = row_u + ((halfwidth + 31) & ~31); # 1129| if (!row_u) # 1130|-> return 1; # 1131| # 1132| for (y = 0; y < height - 1; y += 2) { Error: CPPCHECK_WARNING (CWE-682): [#def63] libyuv-0/source/convert_from_argb.cc:1345: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 1343| // Allocate a rows of yuv. # 1344| align_buffer_64(row_y, ((width + 63) & ~63) * 2); # 1345|-> uint8_t* row_u = row_y + ((width + 63) & ~63); # 1346| uint8_t* row_v = row_u + ((width + 63) & ~63) / 2; # 1347| if (!row_y) Error: CPPCHECK_WARNING (CWE-401): [#def64] libyuv-0/source/convert_from_argb.cc:1348: error[memleak]: Memory leak: row_y_mem # 1346| uint8_t* row_v = row_u + ((width + 63) & ~63) / 2; # 1347| if (!row_y) # 1348|-> return 1; # 1349| # 1350| for (y = 0; y < height; ++y) { Error: CPPCHECK_WARNING (CWE-682): [#def65] libyuv-0/source/convert_from_argb.cc:1557: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 1555| // Allocate a rows of yuv. # 1556| align_buffer_64(row_y, ((width + 63) & ~63) * 2); # 1557|-> uint8_t* row_u = row_y + ((width + 63) & ~63); # 1558| uint8_t* row_v = row_u + ((width + 63) & ~63) / 2; # 1559| if (!row_y) Error: CPPCHECK_WARNING (CWE-401): [#def66] libyuv-0/source/convert_from_argb.cc:1560: error[memleak]: Memory leak: row_y_mem # 1558| uint8_t* row_v = row_u + ((width + 63) & ~63) / 2; # 1559| if (!row_y) # 1560|-> return 1; # 1561| # 1562| for (y = 0; y < height; ++y) { Error: CPPCHECK_WARNING (CWE-682): [#def67] libyuv-0/source/convert_from_argb.cc:3539: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 3537| const int row_uv_size = ((halfwidth + 31) & ~31); # 3538| align_buffer_64(row_uj, row_uv_size * 2 + row_size * 2); # 3539|-> uint8_t* row_vj = row_uj + row_uv_size; # 3540| uint8_t* row = row_vj + row_uv_size; # 3541| #endif Error: CPPCHECK_WARNING (CWE-401): [#def68] libyuv-0/source/convert_from_argb.cc:3543: error[memleak]: Memory leak: row_uj_mem # 3541| #endif # 3542| if (!row_uj) # 3543|-> return 1; # 3544| # 3545| for (y = 0; y < height - 1; y += 2) { Error: CPPCHECK_WARNING (CWE-401): [#def69] libyuv-0/source/planar_functions.cc:3028: error[memleak]: Memory leak: halfalpha_mem # 3026| align_buffer_64(halfalpha, halfwidth); # 3027| if (!halfalpha) # 3028|-> return 1; # 3029| for (y = 0; y < height; y += 2) { # 3030| // last row of odd height image use 1 row of alpha instead of 2. Error: CPPCHECK_WARNING (CWE-401): [#def70] libyuv-0/source/planar_functions.cc:4713: error[memleak]: Memory leak: rowbuf_mem # 4711| align_buffer_64(rowbuf, (4 + width + 4) * 4); # 4712| if (!rowbuf) # 4713|-> return 1; # 4714| memset(rowbuf, 0, 16); # 4715| memset(rowbuf + (4 + width) * 4, 0, 16); Error: CPPCHECK_WARNING (CWE-682): [#def71] libyuv-0/source/planar_functions.cc:4865: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 4863| align_buffer_64(rows, row_size * 2 + (kEdge + row_size * 3 + kEdge)); # 4864| uint8_t* row_sobelx = rows; # 4865|-> uint8_t* row_sobely = rows + row_size; # 4866| uint8_t* row_y = rows + row_size * 2; # 4867| Error: CPPCHECK_WARNING (CWE-682): [#def72] libyuv-0/source/planar_functions.cc:4866: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 4864| uint8_t* row_sobelx = rows; # 4865| uint8_t* row_sobely = rows + row_size; # 4866|-> uint8_t* row_y = rows + row_size * 2; # 4867| # 4868| // Convert first row. Error: CPPCHECK_WARNING (CWE-401): [#def73] libyuv-0/source/planar_functions.cc:4873: error[memleak]: Memory leak: rows_mem # 4871| uint8_t* row_y2 = row_y1 + row_size; # 4872| if (!rows) # 4873|-> return 1; # 4874| ARGBToYJRow(src_argb, row_y0, width); # 4875| row_y0[-1] = row_y0[0]; Error: CPPCHECK_WARNING (CWE-401): [#def74] libyuv-0/source/planar_functions.cc:5661: error[memleak]: Memory leak: rows_mem # 5659| align_buffer_64(rows, awidth * 3); # 5660| if (!rows) # 5661|-> return 1; # 5662| # 5663| for (y = 0; y < height - 1; y += 2) { Error: CPPCHECK_WARNING (CWE-401): [#def75] libyuv-0/source/rotate.cc:157: error[memleak]: Memory leak: row_mem # 155| assert(row); # 156| if (!row) # 157|-> return; # 158| const uint8_t* src_bot = src + src_stride * (height - 1); # 159| uint8_t* dst_bot = dst + dst_stride * (height - 1); Error: CPPCHECK_WARNING (CWE-401): [#def76] libyuv-0/source/rotate.cc:574: error[memleak]: Memory leak: row_mem # 572| assert(row); # 573| if (!row) # 574|-> return; # 575| # 576| // Odd height will harmlessly mirror the middle row twice. Error: CPPCHECK_WARNING (CWE-401): [#def77] libyuv-0/source/rotate_argb.cc:133: error[memleak]: Memory leak: row_mem # 131| align_buffer_64(row, width * 4); # 132| if (!row) # 133|-> return 1; # 134| #if defined(HAS_ARGBMIRRORROW_NEON) # 135| if (TestCpuFlag(kCpuHasNEON)) { Error: CPPCHECK_WARNING (CWE-401): [#def78] libyuv-0/source/scale.cc:964: error[memleak]: Memory leak: row16_mem # 962| align_buffer_64(row16, src_width * 2); # 963| if (!row16) # 964|-> return 1; # 965| void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx, # 966| const uint16_t* src_ptr, uint8_t* dst_ptr) = Error: CPPCHECK_WARNING (CWE-401): [#def79] libyuv-0/source/scale.cc:1061: error[memleak]: Memory leak: row32_mem # 1059| align_buffer_64(row32, src_width * 4); # 1060| if (!row32) # 1061|-> return 1; # 1062| void (*ScaleAddCols)(int dst_width, int boxheight, int x, int dx, # 1063| const uint32_t* src_ptr, uint16_t* dst_ptr) = Error: CPPCHECK_WARNING (CWE-401): [#def80] libyuv-0/source/scale.cc:1115: error[memleak]: Memory leak: row_mem # 1113| align_buffer_64(row, src_width); # 1114| if (!row) # 1115|-> return 1; # 1116| # 1117| const int max_y = (src_height - 1) << 16; Error: CPPCHECK_WARNING (CWE-401): [#def81] libyuv-0/source/scale.cc:1246: error[memleak]: Memory leak: row_mem # 1244| align_buffer_64(row, src_width * 2); # 1245| if (!row) # 1246|-> return 1; # 1247| # 1248| const int max_y = (src_height - 1) << 16; Error: CPPCHECK_WARNING (CWE-401): [#def82] libyuv-0/source/scale.cc:1431: error[memleak]: Memory leak: row_mem # 1429| align_buffer_64(row, row_size * 2); # 1430| if (!row) # 1431|-> return 1; # 1432| # 1433| uint8_t* rowptr = row; Error: CPPCHECK_WARNING (CWE-401): [#def83] libyuv-0/source/scale.cc:1904: error[memleak]: Memory leak: row_mem # 1902| uint16_t* rowptr = (uint16_t*)row; # 1903| if (!row) # 1904|-> return 1; # 1905| # 1906| ScaleFilterCols(rowptr, src, dst_width, x, dx); Error: CPPCHECK_WARNING (CWE-401): [#def84] libyuv-0/source/scale_argb.cc:174: error[memleak]: Memory leak: row_mem # 172| align_buffer_64(row, row_size * 2); # 173| if (!row) # 174|-> return 1; # 175| int row_stride = src_stride * (dy >> 16); # 176| void (*ScaleARGBRowDown2)(const uint8_t* src_argb, ptrdiff_t src_stride, Error: CPPCHECK_WARNING (CWE-401): [#def85] libyuv-0/source/scale_argb.cc:421: error[memleak]: Memory leak: row_mem # 419| align_buffer_64(row, clip_src_width * 4); # 420| if (!row) # 421|-> return 1; # 422| # 423| const int max_y = (src_height - 1) << 16; Error: CPPCHECK_WARNING (CWE-401): [#def86] libyuv-0/source/scale_argb.cc:598: error[memleak]: Memory leak: row_mem # 596| align_buffer_64(row, row_size * 2); # 597| if (!row) # 598|-> return 1; # 599| # 600| uint8_t* rowptr = row; Error: CPPCHECK_WARNING (CWE-682): [#def87] libyuv-0/source/scale_rgb.cc:43: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 41| uint8_t* src_argb = # 42| (uint8_t*)malloc(src_width * src_height * 4 + dst_width * dst_height * 4); # 43|-> uint8_t* dst_argb = src_argb + src_width * src_height * 4; # 44| # 45| if (!src_argb) { Error: CPPCHECK_WARNING (CWE-401): [#def88] libyuv-0/source/scale_uv.cc:208: error[memleak]: Memory leak: row_mem # 206| align_buffer_64(row, row_size * 2); # 207| if (!row) # 208|-> return 1; # 209| int row_stride = src_stride * (dy >> 16); # 210| void (*ScaleUVRowDown2)(const uint8_t* src_uv, ptrdiff_t src_stride, Error: CPPCHECK_WARNING (CWE-401): [#def89] libyuv-0/source/scale_uv.cc:455: error[memleak]: Memory leak: row_mem # 453| align_buffer_64(row, clip_src_width * 2); # 454| if (!row) # 455|-> return 1; # 456| if (y > max_y) { # 457| y = max_y; Error: CPPCHECK_WARNING (CWE-401): [#def90] libyuv-0/source/scale_uv.cc:615: error[memleak]: Memory leak: row_mem # 613| align_buffer_64(row, row_size * 2); # 614| if (!row) # 615|-> return 1; # 616| # 617| uint8_t* rowptr = row; Error: COMPILER_WARNING: [#def91] libyuv-0/unit_test/convert_test.cc: scope_hint: In function ‘__static_initialization_and_destruction_0()’ libyuv-0/unit_test/convert_test.cc:2110:1: note: variable tracking size limit exceeded with ‘-fvar-tracking-assignments’, retrying without # 2108| #endif // !defined(LEAN_TESTS) # 2109| # 2110|-> } // namespace libyuv Error: CPPCHECK_WARNING (CWE-456): [#def92] libyuv-0/util/yuvconvert.cc:256: error[uninitdata]: Memory is allocated but not initialized: ch_dst # 254| } # 255| delete[] ch_org; # 256|-> delete[] ch_dst; # 257| delete[] ch_rec; # 258| delete[] file_rec;
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-112.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | libyuv-0-0.58.20240704git96bbdb5.fc44 |
| store-results-to | /tmp/tmphz50mu6e/libyuv-0-0.58.20240704git96bbdb5.fc44.tar.xz |
| time-created | 2026-01-08 19:26:59 |
| time-finished | 2026-01-08 19:32:44 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmphz50mu6e/libyuv-0-0.58.20240704git96bbdb5.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmphz50mu6e/libyuv-0-0.58.20240704git96bbdb5.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |