demux_ts: fix crash on broken packets
commit5c53ce6bae5575fc708798221dba9e856a8caa8f
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 10 Jul 2010 16:43:00 +0000 (10 16:43 +0000)
committerUoti Urpala <uau@glyph.nonexistent.invalid>
Tue, 2 Nov 2010 02:14:43 +0000 (2 04:14 +0200)
tree03587e554146508d9a705a8afc3691ddccb90c52
parent5e95024317add19c376114c40a87e69d969c69ce
demux_ts: fix crash on broken packets

Check packet size before memmove to avoid crashes e.g. if we recognized the
wrong type and subtracted more header bytes than there are overall bytes.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31669 b3059339-0415-0410-9bf9-f77b7e298cf2
libmpdemux/demux_ts.c