[vlc-commits] subtitle: peek_Readline: fix peek offset
Francois Cartegnie
git at videolan.org
Mon Oct 5 23:31:43 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Oct 3 15:46:38 2015 +0200| [9666ba63693e7be93595c99d843a6497e392a606] | committer: Francois Cartegnie
subtitle: peek_Readline: fix peek offset
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9666ba63693e7be93595c99d843a6497e392a606
---
modules/demux/subtitle_helper.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/demux/subtitle_helper.h b/modules/demux/subtitle_helper.h
index 7b921ca..0a317b9 100644
--- a/modules/demux/subtitle_helper.h
+++ b/modules/demux/subtitle_helper.h
@@ -23,7 +23,7 @@ inline static char * peek_Readline( stream_t *p_demuxstream, uint64_t *pi_offset
uint8_t *p_peek;
ssize_t i_peek = stream_Peek( p_demuxstream, (const uint8_t **) &p_peek,
*pi_offset + 2048 );
- if( i_peek <= 0 )
+ if( i_peek < 0 || (uint64_t) i_peek < *pi_offset )
return NULL;
const uint64_t i_bufsize = (uint64_t) i_peek - *pi_offset;
More information about the vlc-commits
mailing list