changeset 25889:264ca4cd0c8e

Properly check length of flac metadata.
author reimar
date Tue, 29 Jan 2008 22:00:58 +0000
parents 1822b5ad9860
children 374816d4d565
files libmpdemux/demux_audio.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c	Tue Jan 29 21:55:57 2008 +0000
+++ b/libmpdemux/demux_audio.c	Tue Jan 29 22:00:58 2008 +0000
@@ -229,6 +229,8 @@
           ptr += 4;
 
           comment = ptr;
+          if (&comment[length] < comments || &comment[length] >= &comments[blk_len])
+            return;
           c = comment[length];
           comment[length] = 0;