diff options
Diffstat (limited to 'lib/libpam.c')
-rw-r--r-- | lib/libpam.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libpam.c b/lib/libpam.c index 6d2acba7..60d446d9 100644 --- a/lib/libpam.c +++ b/lib/libpam.c @@ -90,7 +90,7 @@ validateComputableSize(struct pam * const pamP) { if (depth > INT_MAX/sizeof(sample)) pm_error("image depth (%u) too large to be processed", depth); - else if (depth * sizeof(sample) > INT_MAX/pamP->width) + else if (pamP->width > 0 && depth * sizeof(sample) > INT_MAX/pamP->width) pm_error("image width and depth (%u, %u) too large " "to be processed.", pamP->width, depth); else if (pamP->width * (depth * sizeof(sample)) > |