Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Side by Side Diff: third_party/lcms2-2.6/0003-uninit.patch

Issue 2362813002: Fix use uninitialized value and stack buffer overflow read (Closed)
Patch Set: address tsepez's comments Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/lcms2-2.6/README.pdfium » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff --git a/third_party/lcms2-2.6/src/cmstypes.c b/third_party/lcms2-2.6/src/cm stypes.c
2 index 06742b5..44c5b87 100644
3 --- a/third_party/lcms2-2.6/src/cmstypes.c
4 +++ b/third_party/lcms2-2.6/src/cmstypes.c
5 @@ -2964,7 +2964,7 @@ void *Type_ColorantTable_Read(struct _cms_typehandler_stru ct* self, cmsIOHANDLER
6 {
7 cmsUInt32Number i, Count;
8 cmsNAMEDCOLORLIST* List;
9 - char Name[34];
10 + char Name[33];
11 cmsUInt16Number PCS[3];
12
13
14 @@ -2979,7 +2979,7 @@ void *Type_ColorantTable_Read(struct _cms_typehandler_stru ct* self, cmsIOHANDLER
15 for (i=0; i < Count; i++) {
16
17 if (io ->Read(io, Name, 32, 1) != 1) goto Error;
18 - Name[33] = 0;
19 + Name[32] = 0;
20
21 if (!_cmsReadUInt16Array(io, 3, PCS)) goto Error;
22
23 @@ -3106,6 +3106,7 @@ void *Type_NamedColor_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* i
24
25 memset(Colorant, 0, sizeof(Colorant));
26 if (io -> Read(io, Root, 32, 1) != 1) return NULL;
27 + Root[32] = 0;
28 if (!_cmsReadUInt16Array(io, 3, PCS)) goto Error;
29 if (!_cmsReadUInt16Array(io, nDeviceCoords, Colorant)) goto Error;
30
OLDNEW
« no previous file with comments | « no previous file | third_party/lcms2-2.6/README.pdfium » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698