summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2020-02-08 17:40:39 +0100
committerMarcus Meissner <marcus@jet.franken.de>2020-02-08 17:41:12 +0100
commit67d70968bef66b7fc9d614cd4e361ea9b2e7eed1 (patch)
treee5100d2649f83f75146d9af92a268644a9608a89
parent02df2f3f42d40a51fe9b6705c8e689fd782a9520 (diff)
downloadlibgphoto2-67d70968bef66b7fc9d614cd4e361ea9b2e7eed1.tar.gz
fixed integer overflow check to avoid overflow (AFL)
-rw-r--r--camlibs/polaroid/pdc640.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/camlibs/polaroid/pdc640.c b/camlibs/polaroid/pdc640.c
index 146f4779a..1c84bbf14 100644
--- a/camlibs/polaroid/pdc640.c
+++ b/camlibs/polaroid/pdc640.c
@@ -511,7 +511,7 @@ pdc640_processtn (int width, int height, unsigned char **data, int size) {
int y;
/* Sanity checks */
- if ((data == NULL) || (size < width * height))
+ if ((data == NULL) || (size / width < height))
return (GP_ERROR_CORRUPTED_DATA);
/* Allocate a new buffer */