/[gentoo-x86]/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-guard_against_bad_num_components_value.patch
Gentoo

Contents of /media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-guard_against_bad_num_components_value.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Jul 31 04:16:14 2012 UTC (9 months, 3 weeks ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
old

(Portage version: 2.2.0_alpha116/cvs/Linux x86_64)

1 Wed May 30 20:36:42 2012 UTC by dcommander with message:
2
3 "Guard against num_components being a ridiculous value due to a corrupt header"
4
5 http://libjpeg-turbo.svn.sourceforge.net/viewvc/libjpeg-turbo/branches/1.2.x/jdmarker.c?r1=751&r2=831&pathrev=831
6
7 --- jdmarker.c
8 +++ jdmarker.c
9 @@ -323,14 +323,15 @@
10
11 /* Collect the component-spec parameters */
12
13 - for (i = 0; i < cinfo->num_components; i++)
14 + for (i = 0; i < MAX_COMPS_IN_SCAN; i++)
15 cinfo->cur_comp_info[i] = NULL;
16
17 for (i = 0; i < n; i++) {
18 INPUT_BYTE(cinfo, cc, return FALSE);
19 INPUT_BYTE(cinfo, c, return FALSE);
20
21 - for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
22 + for (ci = 0, compptr = cinfo->comp_info;
23 + ci < cinfo->num_components && ci < MAX_COMPS_IN_SCAN;
24 ci++, compptr++) {
25 if (cc == compptr->component_id && !cinfo->cur_comp_info[ci])
26 goto id_found;

  ViewVC Help
Powered by ViewVC 1.1.13