diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-02-08 17:40:39 +0100 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-02-08 17:41:12 +0100 |
commit | 67d70968bef66b7fc9d614cd4e361ea9b2e7eed1 (patch) | |
tree | e5100d2649f83f75146d9af92a268644a9608a89 /camlibs/polaroid | |
parent | 02df2f3f42d40a51fe9b6705c8e689fd782a9520 (diff) | |
download | libgphoto2-67d70968bef66b7fc9d614cd4e361ea9b2e7eed1.tar.gz |
fixed integer overflow check to avoid overflow (AFL)
Diffstat (limited to 'camlibs/polaroid')
-rw-r--r-- | camlibs/polaroid/pdc640.c | 2 |
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 */ |