[vlc-commits] [Git][videolan/vlc][master] opus: check return value of read_chars

Tristan Matthews (@tmatth) gitlab at videolan.org
Mon Sep 22 15:10:17 UTC 2025



Tristan Matthews pushed to branch master at VideoLAN / VLC


Commits:
8deaea34 by Tristan Matthews at 2025-09-22T13:32:20+00:00
opus: check return value of read_chars

Fixes CID #1665605

- - - - -


1 changed file:

- modules/codec/opus_header.c


Changes:

=====================================
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;
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8deaea34ae3e0fbe2914eca6abc47d1adf37dcb3

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/8deaea34ae3e0fbe2914eca6abc47d1adf37dcb3
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list