History

probetest: check command line arguments

Fixes CID733835 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer committed 14 years ago

Commit 80db07a1 parent 8ab0b9c1 file · +10 −0Browse files

Unified · Split

tools/probetest.c+10−0
@@ -63,6 +63,16 @@ int main(int argc, char **argv) · 62 unmodified lines
6363 if(argc >= 3)
6464 max_size = atoi(argv[2]);
6565
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+
6676 avcodec_register_all();
6777 av_register_all();
6878

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t