Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:beranger5ca
gimp-2.3.15
gimp-2.0.5-sunras-overflow.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gimp-2.0.5-sunras-overflow.patch of Package gimp-2.3.15
--- gimp-2.0.5/ChangeLog.sunras-overflow 2004-09-25 00:00:43.000000000 +0200 +++ gimp-2.0.5/ChangeLog 2007-05-04 10:37:32.000000000 +0200 @@ -0,0 +1,7 @@ +2007-04-27 Sven Neumann <sven@gimp.org> + + Merged from trunk: + + * plug-ins/common/sunras.c (set_color_table): guard against a + possible stack overflow. + --- gimp-2.0.5/plug-ins/common/sunras.c.sunras-overflow 2004-06-15 11:21:43.000000000 +0200 +++ gimp-2.0.5/plug-ins/common/sunras.c 2007-05-04 10:37:32.000000000 +0200 @@ -102,8 +102,7 @@ gint32 image_ID, gint32 drawable_ID); -static void set_color_table (gint32, L_SUNFILEHEADER *, unsigned char *); - +static void set_color_table (gint32, L_SUNFILEHEADER *, const guchar *); static gint32 create_new_image (const gchar *filename, guint width, guint height, @@ -864,19 +863,20 @@ static void set_color_table (gint32 image_ID, L_SUNFILEHEADER *sunhdr, - guchar *suncolmap) + const guchar *suncolmap) { - int ncols, j; - guchar ColorMap[256*3]; + guchar ColorMap[256 * 3]; + gint ncols, j; ncols = sunhdr->l_ras_maplength / 3; - if (ncols <= 0) return; + if (ncols <= 0) + return; - for (j = 0; j < ncols; j++) + for (j = 0; j < MIN (ncols, 256); j++) { - ColorMap[j*3] = suncolmap[j]; - ColorMap[j*3+1] = suncolmap[j+ncols]; - ColorMap[j*3+2] = suncolmap[j+2*ncols]; + ColorMap[j * 3 + 0] = suncolmap[j]; + ColorMap[j * 3 + 1] = suncolmap[j + ncols]; + ColorMap[j * 3 + 2] = suncolmap[j + 2 * ncols]; } #ifdef DEBUG
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor