Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 85252 Details for
Bug 130889
media-libs/jpeg: maxmem feature not used (DoS via memory exhaustion)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
jpeg-sysconf-maxmem.diff
jpeg-sysconf-maxmem.diff (text/plain), 662 bytes, created by
Tavis Ormandy (RETIRED)
on 2006-04-23 01:26:23 UTC
(
hide
)
Description:
jpeg-sysconf-maxmem.diff
Filename:
MIME Type:
Creator:
Tavis Ormandy (RETIRED)
Created:
2006-04-23 01:26:23 UTC
Size:
662 bytes
patch
obsolete
>--- jmemansi.c.orig 1996-01-06 23:29:46.000000000 +0000 >+++ jmemansi.c 2006-04-23 09:17:50.169747792 +0100 >@@ -12,6 +12,8 @@ > * is shoved onto the user. > */ > >+#include <unistd.h> >+ > #define JPEG_INTERNALS > #include "jinclude.h" > #include "jpeglib.h" >@@ -157,7 +159,13 @@ > GLOBAL(long) > jpeg_mem_init (j_common_ptr cinfo) > { >- return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ >+ long phys_size; >+ >+ if ((phys_size = sysconf(_SC_PHYS_PAGES)) == -1) >+ return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ >+ if ((phys_size *= sysconf(_SC_PAGESIZE)) < 0) >+ return DEFAULT_MAX_MEM; >+ return phys_size; > } > > GLOBAL(void)
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 130889
:
85214
|
85252
|
85260
|
87770
|
88017
|
88028
|
88029