summaryrefslogtreecommitdiff
path: root/multimedia/vlc2/patches/patch-CVE-2013-4388
blob: 8990f9255088673b49e725ee27ad9d1700c62d1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$NetBSD: patch-CVE-2013-4388,v 1.1 2013/10/01 14:50:38 drochner Exp $

upstream commit 9794ec1cd268c04c8bca13a5fae15df6594dff3e

--- modules/packetizer/mpeg4audio.c.orig	2012-04-27 17:14:57.000000000 +0000
+++ modules/packetizer/mpeg4audio.c
@@ -892,8 +892,11 @@ static int LOASParse( decoder_t *p_dec, 
                         continue;
 
                     /* FIXME that's slow (and a bit ugly to write in place) */
-                    for( i = 0; i < pi_payload[i_program][i_layer]; i++ )
+                    for( i = 0; i < pi_payload[i_program][i_layer]; i++ ) {
+			if (i_accumulated >= i_buffer)
+			    return 0;
                         p_buffer[i_accumulated++] = bs_read( &s, 8 );
+		    }
                 }
             }
         }