Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 72023 Details for
Bug 109760
media-libs/libextractor integer overflow
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
pngextractor_0.5.5-0.5.6a.patch
pngextractor_0.5.5-0.5.6a.patch (text/plain), 2.93 KB, created by
Thierry Carrez (RETIRED)
on 2005-11-03 08:19:46 UTC
(
hide
)
Description:
pngextractor_0.5.5-0.5.6a.patch
Filename:
MIME Type:
Creator:
Thierry Carrez (RETIRED)
Created:
2005-11-03 08:19:46 UTC
Size:
2.93 KB
patch
obsolete
>--- /home/tcarrez/pngextractor.c.0.5.5 2005-11-03 17:04:27.000000000 +0100 >+++ /home/tcarrez/pngextractor.c.0.5.6a 2005-09-18 11:54:35.000000000 +0200 >@@ -60,7 +60,7 @@ > return result; > } > >-static int getIntAt(const char * pos) { >+static int getIntAt(const void * pos) { > char p[4]; > > memcpy(p, pos, 4); /* ensure alignment! */ >@@ -86,7 +86,7 @@ > { NULL, EXTRACTOR_UNKNOWN}, > }; > >-static struct EXTRACTOR_Keywords * processtEXt(const unsigned char * data, >+static struct EXTRACTOR_Keywords * processtEXt(const char * data, > unsigned int length, > struct EXTRACTOR_Keywords * prev) { > char * keyword; >@@ -114,7 +114,7 @@ > prev); > } > >-static struct EXTRACTOR_Keywords * processiTXt(const unsigned char * data, >+static struct EXTRACTOR_Keywords * processiTXt(const char * data, > unsigned int length, > struct EXTRACTOR_Keywords * prev) { > unsigned int pos; >@@ -165,9 +165,9 @@ > /* printf("out of memory"); */ > return prev; /* out of memory */ > } >- ret = uncompress(buf, >+ ret = uncompress((Bytef*) buf, > &bufLen, >- &data[pos], >+ (const Bytef*) &data[pos], > length - pos); > if (ret == Z_OK) { > /* printf("zlib ok"); */ >@@ -196,7 +196,7 @@ > prev); > } > >-static struct EXTRACTOR_Keywords * processIHDR(const unsigned char * data, >+static struct EXTRACTOR_Keywords * processIHDR(const char * data, > unsigned int length, > struct EXTRACTOR_Keywords * prev) { > char * tmp; >@@ -216,7 +216,7 @@ > } > > /* not supported... */ >-static struct EXTRACTOR_Keywords * processzTXt(const unsigned char * data, >+static struct EXTRACTOR_Keywords * processzTXt(const char * data, > unsigned int length, > struct EXTRACTOR_Keywords * prev) { > char * keyword; >@@ -248,9 +248,9 @@ > /* printf("out of memory"); */ > return prev; /* out of memory */ > } >- ret = uncompress(buf, >+ ret = uncompress((Bytef*) buf, > &bufLen, >- &data[off], >+ (const Bytef*) &data[off], > length - off); > if (ret == Z_OK) { > /* printf("zlib ok"); */ >@@ -283,11 +283,11 @@ > > > struct EXTRACTOR_Keywords * libextractor_png_extract(char * filename, >- const unsigned char * data, >+ const char * data, > size_t size, > struct EXTRACTOR_Keywords * prev) { >- const unsigned char * pos; >- const unsigned char * end; >+ const char * pos; >+ const char * end; > struct EXTRACTOR_Keywords * result; > unsigned int length; > >@@ -307,7 +307,7 @@ > length = htonl(getIntAt(pos)); pos+=4; > /* printf("Length: %u, pos %u\n", length, pos - data); */ > if ( (pos+4+length+4 > end) || >- (pos+4+length+4 < pos + 4 + length) ) >+ (pos+4+length+4 < pos + 8) ) > break; > > if (0 == strncmp(pos, "IHDR", 4))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 109760
:
72019
|
72020
| 72023