Two more false positives.
False 1 11107 V512 A call of the 'memcpy' function will lead to underflow of the buffer '& bit_24'. code packunpack.cpp 546 False
False 2 11112 V512 A call of the 'memcpy' function will lead to underflow of the buffer '& bit_24'. code packunpack.cpp 630 False
In both cases, the last byte (alpha channel) is not memcpy'd. However, the function "convert_24_to_16" ignores the alpha byte it is passed and always sets it to 1, so the garbage data is never used.
Index: code/anim/packunpack.cpp
===================================================================
--- code/anim/packunpack.cpp (revision 7666)
+++ code/anim/packunpack.cpp (working copy)
@@ -543,7 +543,7 @@
}
} else {
// stuff the 24 bit value
- memcpy(&bit_24, &ai->parent->palette[pix * 3], 3);
+ memcpy(&bit_24, &ai->parent->palette[pix * 3], 3); //-V512
// convert to 16 bit
convert_24_to_16(bit_24, &bit_16);
@@ -627,7 +627,7 @@
}
} else {
// stuff the 24 bit value
- memcpy(&bit_24, &ai->parent->palette[pix * 3], 3);
+ memcpy(&bit_24, &ai->parent->palette[pix * 3], 3); //-V512
// convert to 16 bit
convert_24_to_16(bit_24, &bit_16);
[attachment deleted by ninja]