diff options
author | Tristan Matthews <tmatth@videolan.org> | 2019-02-27 23:08:56 +0300 |
---|---|---|
committer | Tristan Matthews <tmatth@videolan.org> | 2019-02-27 23:08:56 +0300 |
commit | 3cbddfb7443fb51109612ead4e5cd0a050ab6aa0 (patch) | |
tree | 2da6976a5bde48bb3550eda66fbc9060fb658efe | |
parent | 191fc0a2cd090f7664bc793cd35791c9c59f169f (diff) |
doc: avoid segfault in samplencspeex-fuzz-target
-rw-r--r-- | doc/sampleenc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/sampleenc.c b/doc/sampleenc.c index a0ec8b6..b6a0636 100644 --- a/doc/sampleenc.c +++ b/doc/sampleenc.c @@ -24,6 +24,9 @@ int main(int argc, char **argv) tmp=8; speex_encoder_ctl(state, SPEEX_SET_QUALITY, &tmp); + if (argc < 2) + return 1; + inFile = argv[1]; fin = fopen(inFile, "r"); |