mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 01:50:38 +00:00
* Source/NSBitmapImageRep+JPEG.m: Put cinfo into a defined state
before using it. Patch by Vincent Richomme <forumer@smartmobili.com>. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29998 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8f43eb6c4e
commit
63c073879a
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-03-18 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSBitmapImageRep+JPEG.m: Put cinfo into a defined state
|
||||
before using it.
|
||||
Patch by Vincent Richomme <forumer@smartmobili.com>.
|
||||
|
||||
2010-03-17 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTextView.m (-readSelectionFromPasteboard:type:): Fix
|
||||
|
|
|
@ -350,6 +350,8 @@ static void gs_jpeg_memory_dest_destroy (j_compress_ptr cinfo)
|
|||
struct jpeg_decompress_struct cinfo;
|
||||
struct gs_jpeg_error_mgr jerrMgr;
|
||||
|
||||
memset((void*)&cinfo, 0, sizeof(struct jpeg_decompress_struct));
|
||||
|
||||
/* Be sure imageData contains data */
|
||||
if (![imageData length])
|
||||
{
|
||||
|
@ -400,6 +402,8 @@ static void gs_jpeg_memory_dest_destroy (j_compress_ptr cinfo)
|
|||
if (!(self = [super init]))
|
||||
return nil;
|
||||
|
||||
memset((void*)&cinfo, 0, sizeof(struct jpeg_decompress_struct));
|
||||
|
||||
/* Establish the our custom error handler */
|
||||
gs_jpeg_error_mgr_init(&jerrMgr);
|
||||
cinfo.err = jpeg_std_error(&jerrMgr.parent);
|
||||
|
@ -549,6 +553,8 @@ static void gs_jpeg_memory_dest_destroy (j_compress_ptr cinfo)
|
|||
return nil;
|
||||
}
|
||||
|
||||
memset((void*)&cinfo, 0, sizeof(struct jpeg_decompress_struct));
|
||||
|
||||
imageSource = [self bitmapData];
|
||||
sPP = [self samplesPerPixel];
|
||||
width = [self size].width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue