summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/soxdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c
index d3f709f9a6..35e11feec6 100644
--- a/libavformat/soxdec.c
+++ b/libavformat/soxdec.c
@@ -90,7 +90,7 @@ static int sox_read_header(AVFormatContext *s)
sample_rate_frac);
if ((header_size + 4) & 7 || header_size < SOX_FIXED_HDR + comment_size
- || st->codecpar->channels > 65535) /* Reserve top 16 bits */ {
+ || st->codecpar->channels > 65535 || st->codecpar->channels <= 0) /* Reserve top 16 bits */ {
av_log(s, AV_LOG_ERROR, "invalid header\n");
return AVERROR_INVALIDDATA;
}