changeset 19641:84bf8bd9f9da

Fix read beyond the end of allocated memory block.
author eugeni
date Sat, 02 Sep 2006 19:51:26 +0000
parents 521f71200591
children db2a522e319e
files libmpdemux/demux_mkv.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_mkv.c	Sat Sep 02 19:39:24 2006 +0000
+++ b/libmpdemux/demux_mkv.c	Sat Sep 02 19:51:26 2006 +0000
@@ -2878,7 +2878,7 @@
           ptr1++;
       
           /* Newline */
-          while (*ptr1 == '\\' && ptr1+1-block < size && (*(ptr1+1)|0x20) == 'n')
+          while (ptr1+1-block < size && *ptr1 == '\\' && (*(ptr1+1)|0x20) == 'n')
             {
               mkv_d->clear_subs_at[mkv_d->subs.lines++]
                 = timecode + block_duration;