diff options
Diffstat (limited to 'test/decode_bmp.c')
-rw-r--r-- | test/decode_bmp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/decode_bmp.c b/test/decode_bmp.c index e5dc572..e90515a 100644 --- a/test/decode_bmp.c +++ b/test/decode_bmp.c @@ -70,6 +70,11 @@ int main(int argc, char *argv[]) res = 1; goto cleanup; } + /* skip if the decoded image would be ridiculously large */ + if ((bmp.width * bmp.height) > 2000000) { + res = 1; + goto cleanup; + } } printf("P3\n"); |