Task #90235 - added.err

back to task #90235
download
Error: CPPCHECK_WARNING (CWE-476):
LibRaw-0.21.5/src/decoders/fuji_compressed.cpp:1027: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: info_common
# 1025|   
# 1026|       info_common = (fuji_compressed_params *)malloc(buf_size);
# 1027|->     memcpy(info_common, params, sizeof(fuji_compressed_params));
# 1028|       info_common->qt[0].q_table = (int8_t *)(info_common + 1);
# 1029|       info_common->qt[0].q_base = -1;

Error: CPPCHECK_WARNING (CWE-682):
LibRaw-0.21.5/src/decoders/fuji_compressed.cpp:1028: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
# 1026|       info_common = (fuji_compressed_params *)malloc(buf_size);
# 1027|       memcpy(info_common, params, sizeof(fuji_compressed_params));
# 1028|->     info_common->qt[0].q_table = (int8_t *)(info_common + 1);
# 1029|       info_common->qt[0].q_base = -1;
# 1030|     }

Error: CPPCHECK_WARNING (CWE-476):
LibRaw-0.21.5/src/decoders/fuji_compressed.cpp:1028: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: info_common
# 1026|       info_common = (fuji_compressed_params *)malloc(buf_size);
# 1027|       memcpy(info_common, params, sizeof(fuji_compressed_params));
# 1028|->     info_common->qt[0].q_table = (int8_t *)(info_common + 1);
# 1029|       info_common->qt[0].q_base = -1;
# 1030|     }

Error: CPPCHECK_WARNING (CWE-476):
LibRaw-0.21.5/src/decoders/fuji_compressed.cpp:1029: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: info_common
# 1027|       memcpy(info_common, params, sizeof(fuji_compressed_params));
# 1028|       info_common->qt[0].q_table = (int8_t *)(info_common + 1);
# 1029|->     info_common->qt[0].q_base = -1;
# 1030|     }
# 1031|     init_fuji_block(&info, info_common, raw_offset, dsize);