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-06-18 23:05:49 +0300
commit6916e56dc5d31a7b9b2f61d19ff8f86c86d4dcfc (patch)
tree459b77fd1e940cf6b03491bb23bebb09fbab18ff
parent6e04bfa884e6719b51573ed8bfa713b71fc29db6 (diff)
doc: avoid segfault in samplenc
-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");