diff options
author | Mans Rullgard <mans@mansr.com> | 2012-10-15 00:11:44 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-10-15 21:40:18 +0100 |
commit | 3dc06b6972cf389269e9c36ff0a4373f80f7149b (patch) | |
tree | 595e1e5d999670eff5e92c6a20ad301bb52c9190 /tests/tiny_psnr.c | |
parent | 099294577c8ca5d1a7d3403a57b607791997104d (diff) | |
download | ffmpeg-3dc06b6972cf389269e9c36ff0a4373f80f7149b.tar.gz |
tiny_psnr: check for specified sample size less than 1
A zero or negative sample size is impossible and should be
reported as an error.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'tests/tiny_psnr.c')
-rw-r--r-- | tests/tiny_psnr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/tiny_psnr.c b/tests/tiny_psnr.c index 5db2662478..a53a67038b 100644 --- a/tests/tiny_psnr.c +++ b/tests/tiny_psnr.c @@ -139,7 +139,7 @@ int main(int argc, char *argv[]) } else { char *end; len = strtol(argv[3], &end, 0); - if (*end || len > 2) { + if (*end || len < 1 || len > 2) { fprintf(stderr, "Unsupported sample format: %s\n", argv[3]); return 1; } |