Task #131683 - fixed.err
back to task #131683download
Error: CPPCHECK_WARNING (CWE-476): lerc-4.0.0/src/LercLib/fpl_EsriHuffman.cpp:357: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: originalPtr # 355| *ppByte = (unsigned char *)malloc (rle_len + 1); # 356| unsigned char * originalPtr = *ppByte ; # 357|-> originalPtr[0] = HUFFMAN_PACKBITS; # 358| # 359| unsigned char *packed = originalPtr + 1; //NULL; Error: CPPCHECK_WARNING (CWE-682): lerc-4.0.0/src/LercLib/fpl_EsriHuffman.cpp:359: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 357| originalPtr[0] = HUFFMAN_PACKBITS; # 358| # 359|-> unsigned char *packed = originalPtr + 1; //NULL; # 360| encodePackBits ((unsigned char *)input, input_len, &packed); # 361| Error: CPPCHECK_WARNING (CWE-476): lerc-4.0.0/src/LercLib/fpl_EsriHuffman.cpp:370: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: originalPtr # 368| *ppByte = (unsigned char *)malloc (input_len + 1); # 369| unsigned char * originalPtr = *ppByte ; # 370|-> originalPtr[0] = HUFFMAN_NO_ENCODING; // as is flag # 371| memcpy (originalPtr + 1, input, input_len); # 372| Error: CPPCHECK_WARNING (CWE-682): lerc-4.0.0/src/LercLib/fpl_EsriHuffman.cpp:371: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer. # 369| unsigned char * originalPtr = *ppByte ; # 370| originalPtr[0] = HUFFMAN_NO_ENCODING; // as is flag # 371|-> memcpy (originalPtr + 1, input, input_len); # 372| # 373| return (int)input_len + 1;