fix for memory allocation of thumbs
This commit is contained in:
@@ -9197,15 +9197,21 @@ rtengine::Thumbnail* rtengine::Thumbnail::loadQuickFromRaw (const Glib::ustring&
|
||||
rml.ciffBase = ciff_base;
|
||||
rml.ciffLength = ciff_len;
|
||||
|
||||
char thumb_buffer[thumb_length];
|
||||
char *thumb_buffer malloc(thumb_length+64); // malloc instead of on the stack.
|
||||
if ( thumb_buffer == NULL )
|
||||
{
|
||||
printf("DCRAW: failed3\n");
|
||||
return NULL;
|
||||
}
|
||||
fseek(ifp,thumb_offset,SEEK_SET);
|
||||
fread(thumb_buffer,1,thumb_length,ifp);
|
||||
fclose(ifp);
|
||||
|
||||
rtengine::Thumbnail* tpp = rtengine::Thumbnail::loadFromMemory(thumb_buffer,thumb_length,w,h,fixwh);
|
||||
free(thumb_buffer);
|
||||
if ( tpp == 0 )
|
||||
{
|
||||
printf("DCRAW: failed3\n");
|
||||
printf("DCRAW: failed4\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
1744
rtengine/dcraw.patch
1744
rtengine/dcraw.patch
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user