From: | "Samuli Suominen (ssuominen)" <ssuominen@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in media-libs/libjpeg-turbo/files: libjpeg-turbo-1.2.0-guard_against_bad_num_components_value.patch |
Date: | Thu, 31 May 2012 19:12:29 |
Message-Id: | 20120531191217.EA6B92004C@flycatcher.gentoo.org |
1 | ssuominen 12/05/31 19:12:17 |
2 | |
3 | Added: |
4 | libjpeg-turbo-1.2.0-guard_against_bad_num_components_value.patch |
5 | Log: |
6 | Grab patch from upstream 1.2.x branch for "Guard against num_components being a ridiculousvalue due to a corrupt header" |
7 | |
8 | (Portage version: 2.2.0_alpha108/cvs/Linux x86_64) |
9 | |
10 | Revision Changes Path |
11 | 1.1 media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-guard_against_bad_num_components_value.patch |
12 | |
13 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-guard_against_bad_num_components_value.patch?rev=1.1&view=markup |
14 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-guard_against_bad_num_components_value.patch?rev=1.1&content-type=text/plain |
15 | |
16 | Index: libjpeg-turbo-1.2.0-guard_against_bad_num_components_value.patch |
17 | =================================================================== |
18 | Wed May 30 20:36:42 2012 UTC by dcommander with message: |
19 | |
20 | "Guard against num_components being a ridiculous value due to a corrupt header" |
21 | |
22 | http://libjpeg-turbo.svn.sourceforge.net/viewvc/libjpeg-turbo/branches/1.2.x/jdmarker.c?r1=751&r2=831&pathrev=831 |
23 | |
24 | --- jdmarker.c |
25 | +++ jdmarker.c |
26 | @@ -323,14 +323,15 @@ |
27 | |
28 | /* Collect the component-spec parameters */ |
29 | |
30 | - for (i = 0; i < cinfo->num_components; i++) |
31 | + for (i = 0; i < MAX_COMPS_IN_SCAN; i++) |
32 | cinfo->cur_comp_info[i] = NULL; |
33 | |
34 | for (i = 0; i < n; i++) { |
35 | INPUT_BYTE(cinfo, cc, return FALSE); |
36 | INPUT_BYTE(cinfo, c, return FALSE); |
37 | |
38 | - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; |
39 | + for (ci = 0, compptr = cinfo->comp_info; |
40 | + ci < cinfo->num_components && ci < MAX_COMPS_IN_SCAN; |
41 | ci++, compptr++) { |
42 | if (cc == compptr->component_id && !cinfo->cur_comp_info[ci]) |
43 | goto id_found; |