fix the comptype check to be same as above to avoid crashes (AFL)

This commit is contained in:
Marcus Meissner
2019-12-30 09:04:51 +01:00
parent 7ea83d5dc8
commit 1997601036

View File

@@ -698,7 +698,7 @@ pdc640_getpic (Camera *camera, int n, int thumbnail, int justraw,
CHECK_RESULT (pdc640_transmit_pic (camera->port, cmd, width, thumbnail,
*data, *size));
if (thumbnail || (compression_type == 0 )) {
if (thumbnail || ((compression_type & 3) == 0 )) {
/* Process uncompressed data */
CHECK_RESULT (pdc640_processtn (width, height,
data, *size));