Projects
Eulaceura:Factory
libpng12
_service:obs_scm:CVE-2013-7353-3.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:CVE-2013-7353-3.patch of Package libpng12
From bec9ca9b8aa0cf16d2cde1757379afbe9adbe7d9 Mon Sep 17 00:00:00 2001 From: John Bowler <jbowler@acm.org> Date: Thu, 17 Jan 2013 13:09:32 -0600 Subject: [PATCH] [libpng15] Revised test for validity of "num_unknowns" to eliminate compiler warnings. --- png.h | 2 +- pngset.c | 7 ++++--- diff --git a/png.h b/png.h index db5ca8f..19768ee 100644 --- a/png.h +++ b/png.h @@ -786,7 +786,7 @@ defined(PNG_READ_BACKGROUND_SUPPORTED) defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) /* Storage for unknown chunks that the library doesn't recognize. */ png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT; - png_uint_32 unknown_chunks_num PNG_DEPSTRUCT; + int unknown_chunks_num PNG_DEPSTRUCT; #endif #ifdef PNG_iCCP_SUPPORTED diff --git a/pngset.c b/pngset.c index 6f645b42c..1c9891bd3 100644 --- a/pngset.c +++ b/pngset.c @@ -1040,9 +1040,10 @@ png_set_unknown_chunks(png_structp png_ptr, return; if (num_unknowns < 0 || - num_unknowns >= INT_MAX-info_ptr->unknown_chunks_num || - num_unknowns >= PNG_SIZE_MAX/png_sizeof(png_unknown_chunk) - - info_ptr->unknown_chunks_num) + num_unknowns > INT_MAX-info_ptr->unknown_chunks_num || + (unsigned int)/*SAFE*/(num_unknowns +/*SAFE*/ + info_ptr->unknown_chunks_num) >= + PNG_SIZE_MAX/png_sizeof(png_unknown_chunk)) np=NULL; else -- 2.23.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2