[MPlayer-cvslog] CVS: main/libmpcodecs ad_dk3adpcm.c,1.7,1.8
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Thu Nov 10 21:41:13 CET 2005
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv26871
Modified Files:
ad_dk3adpcm.c
Log Message:
attempt to fix missing and/or broken boundary checks
Index: ad_dk3adpcm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ad_dk3adpcm.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ad_dk3adpcm.c 21 Sep 2004 20:34:46 -0000 1.7
+++ ad_dk3adpcm.c 10 Nov 2005 20:41:11 -0000 1.8
@@ -145,7 +145,7 @@
sum_index = input[14];
diff_index = input[15];
- while (in_ptr < block_size)
+ while (in_ptr < block_size - !decode_top_nibble_next)
// while (in_ptr < 2048)
{
// process the first predictor of the sum channel
@@ -237,7 +237,11 @@
sh_audio->ds->ss_mul)
return -1; /* EOF */
+ if (maxlen < 2 * 4 * sh_audio->wf->nBlockAlign * 2 / 3) {
+ mp_msg(MSGT_DECAUDIO, MSGL_V, "dk3adpcm: maxlen too small in decode_audio\n");
+ return -1;
+ }
return 2 * dk3_adpcm_decode_block(
(unsigned short*)buf, sh_audio->a_in_buffer,
- sh_audio->wf->nBlockAlign);
+ sh_audio->ds->ss_mul);
}
More information about the MPlayer-cvslog
mailing list