Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/speex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Matthews <tmatth@videolan.org>2019-02-27 23:08:56 +0300
committerTristan Matthews <tmatth@videolan.org>2019-02-27 23:08:56 +0300
commit3cbddfb7443fb51109612ead4e5cd0a050ab6aa0 (patch)
tree2da6976a5bde48bb3550eda66fbc9060fb658efe
parent191fc0a2cd090f7664bc793cd35791c9c59f169f (diff)
doc: avoid segfault in samplencspeex-fuzz-target
-rw-r--r--doc/sampleenc.c3
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");