Merge remote-tracking branch 'origin/IccTiffCrash' into gtk3
This commit is contained in:
commit
7a2e0c7b96
@ -1196,7 +1196,11 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// buffer for the exif and iptc
|
// buffer for the exif and iptc
|
||||||
unsigned char* buffer = new unsigned char[165535]; //TODO: Is it really 165535... or 65535 ?
|
int bufferSize = 165535; //TODO: Is it really 165535... or 65535 ?
|
||||||
|
if(profileData)
|
||||||
|
bufferSize += profileLength;
|
||||||
|
|
||||||
|
unsigned char* buffer = new unsigned char[bufferSize];
|
||||||
unsigned char* iptcdata = NULL;
|
unsigned char* iptcdata = NULL;
|
||||||
unsigned int iptclen = 0;
|
unsigned int iptclen = 0;
|
||||||
|
|
||||||
@ -1213,7 +1217,7 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed)
|
|||||||
|
|
||||||
// The maximum lenght is strangely not the same than for the JPEG file...
|
// The maximum lenght is strangely not the same than for the JPEG file...
|
||||||
// Which maximum length is the good one ?
|
// Which maximum length is the good one ?
|
||||||
if (size > 0 && size < 165530) {
|
if (size > 0 && size < bufferSize) {
|
||||||
fwrite (buffer, size, 1, file);
|
fwrite (buffer, size, 1, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user