Browse Source

opus: check return value of read_chars

Fixes CID #1665605
pull/188/head
Tristan Matthews 11 months ago
parent
commit
8deaea34ae
  1. 3
      modules/codec/opus_header.c

3
modules/codec/opus_header.c

@ -140,7 +140,8 @@ int opus_header_parse(const unsigned char *packet, int len, OpusHeader *h)
p.pos = 0;
str[8] = 0;
if (len<19)return 0;
read_chars(&p, (unsigned char*)str, 8);
if (!read_chars(&p, (unsigned char*)str, 8))
return 0;
if (memcmp(str, "OpusHead", 8)!=0)
return 0;

Loading…
Cancel
Save