Fixes CID733835 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Unified · Split
| @@ -63,6 +63,16 @@ int main(int argc, char **argv) · 62 unmodified lines | |||
| 63 | if(argc >= 3) | 63 | if(argc >= 3) |
| 64 | max_size = atoi(argv[2]); | 64 | max_size = atoi(argv[2]); |
| 65 | 65 | ||
| 66 | if (max_size > 1000000000U/8) { | ||
| 67 | fprintf(stderr, "max_size out of bounds\n"); | ||
| 68 | return 1; | ||
| 69 | } | ||
| 70 | |||
| 71 | if (retry_count > 1000000000U) { | ||
| 72 | fprintf(stderr, "retry_count out of bounds\n"); | ||
| 73 | return 1; | ||
| 74 | } | ||
| 75 | |||
| 66 | avcodec_register_all(); | 76 | avcodec_register_all(); |
| 67 | av_register_all(); | 77 | av_register_all(); |
| 68 | 78 | ||