Bugzilla – Attachment 28263 Details for
Bug 65351
VUL-0: CVE-2005-0762: Imagemagick bugs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
ImageMagick-5.5.7-sgi.patch
ImageMagick-5.5.7-sgi.patch (text/x-diff), 3.02 KB, created by
Vladimir Nadvornik
on 2005-02-07 21:38:31 UTC
(
hide
)
Description:
ImageMagick-5.5.7-sgi.patch
Filename:
MIME Type:
Creator:
Vladimir Nadvornik
Created:
2005-02-07 21:38:31 UTC
Size:
3.02 KB
patch
obsolete
>--- coders/sgi.c >+++ coders/sgi.c >@@ -162,16 +162,19 @@ > % > */ > >-static void SGIDecode(const unsigned long bytes_per_pixel, >+static void SGIDecode(const unsigned long width,const size_t bytes_per_pixel, > unsigned char *max_packets,unsigned char *pixels) > { >- long >- count; >- > register unsigned char > *p, > *q; > >+ register long >+ i; >+ >+ ssize_t >+ count; >+ > unsigned long > pixel; > >@@ -179,14 +182,15 @@ > q=pixels; > if (bytes_per_pixel == 2) > { >- for ( ; ; ) >+ for (i=0; i < (long) width; ) > { >- pixel=(*p++) << 8; >+ pixel=(unsigned long) (*p++) << 8; > pixel|=(*p++); >- count=(long) (pixel & 0x7f); >+ count=(ssize_t) (pixel & 0x7f); >+ i+=count; > if (count == 0) > break; >- if (pixel & 0x80) >+ if ((pixel & 0x80) != 0) > for ( ; count != 0; count--) > { > *q=(*p++); >@@ -195,7 +199,7 @@ > } > else > { >- pixel=(*p++) << 8; >+ pixel=(unsigned long) (*p++) << 8; > pixel|=(*p++); > for ( ; count != 0; count--) > { >@@ -207,13 +211,14 @@ > } > return; > } >- for ( ; ; ) >+ for (i=0; i < (long) width; ) > { >- pixel=(*p++); >- count=(long) (pixel & 0x7f); >+ pixel=(unsigned long) (*p++); >+ count=(ssize_t) (pixel & 0x7f); > if (count == 0) > break; >- if (pixel & 0x80) >+ i+=count; >+ if ((pixel & 0x80) != 0) > for ( ; count != 0; count--) > { > *q=(*p++); >@@ -221,7 +226,7 @@ > } > else > { >- pixel=(*p++); >+ pixel=(unsigned long) (*p++); > for ( ; count != 0; count--) > { > *q=(unsigned char) pixel; >@@ -418,13 +423,18 @@ > (void) ReadBlob(image,runlength[y+z*iris_info.rows], > (char *) max_packets); > offset+=runlength[y+z*iris_info.rows]; >- SGIDecode(bytes_per_pixel,max_packets,p+bytes_per_pixel*z); >+ SGIDecode(iris_info.columns,bytes_per_pixel,max_packets, >+ p+bytes_per_pixel*z); > p+=(iris_info.columns*4*bytes_per_pixel); > } > } > } > else > { >+ unsigned long >+ position; >+ >+ position=TellBlob(image); > p=iris_pixels; > for (y=0; y < (long) iris_info.rows; y++) > { >@@ -438,10 +448,12 @@ > (void) ReadBlob(image,runlength[y+z*iris_info.rows], > (char *) max_packets); > offset+=runlength[y+z*iris_info.rows]; >- SGIDecode(bytes_per_pixel,max_packets,p+bytes_per_pixel*z); >+ SGIDecode(iris_info.columns,bytes_per_pixel,max_packets, >+ p+bytes_per_pixel*z); > } > p+=(iris_info.columns*4*bytes_per_pixel); > } >+ (void) SeekBlob(image,position,SEEK_SET); > } > LiberateMemory((void **) &runlength); > LiberateMemory((void **) &max_packets);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 65351
:
28062
|
28063
|
28064
|
28065
|
28260
|
28261
|
28262
| 28263