mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
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>
This commit is contained in:
parent
099294577c
commit
3dc06b6972
@ -139,7 +139,7 @@ int main(int argc, char *argv[])
|
|||||||
} else {
|
} else {
|
||||||
char *end;
|
char *end;
|
||||||
len = strtol(argv[3], &end, 0);
|
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]);
|
fprintf(stderr, "Unsupported sample format: %s\n", argv[3]);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user