Unverified Commit a1524dbc authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avformat/nsvdec: Check asize for PCM


Fixes: CID1604527 Overflowed constant

Sponsored-by: Sovereign Tech Fund
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e83e2465

)
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent 1c1f537e
Showing with 1 addition and 1 deletion
+1 -1
......@@ -603,7 +603,7 @@ null_chunk_retry:
pkt = &nsv->ahead[NSV_ST_AUDIO];
/* read raw audio specific header on the first audio chunk... */
/* on ALL audio chunks ?? seems so! */
if (asize && st[NSV_ST_AUDIO]->codecpar->codec_tag == MKTAG('P', 'C', 'M', ' ')/* && fill_header*/) {
if (asize >= 4 && st[NSV_ST_AUDIO]->codecpar->codec_tag == MKTAG('P', 'C', 'M', ' ')/* && fill_header*/) {
uint8_t bps;
uint8_t channels;
uint16_t samplerate;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment