Segfault when opening a folder which contains a 13229 x 57812 jpeg, fixes #3599
This commit is contained in:
@@ -1291,7 +1291,7 @@ public:
|
||||
b.height_ = height;
|
||||
#endif
|
||||
|
||||
abData.resize(width * height * 3);
|
||||
abData.resize(width * height * 3u);
|
||||
|
||||
if (!abData.isEmpty()) {
|
||||
data = abData.data;
|
||||
|
@@ -67,7 +67,7 @@ void Image8::setScanline (int row, unsigned char* buffer, int bps, float *minVal
|
||||
|
||||
switch (sampleFormat) {
|
||||
case (IIOSF_UNSIGNED_CHAR):
|
||||
memcpy (data + row * width * 3, buffer, width * 3);
|
||||
memcpy (data + row * width * 3u, buffer, width * 3);
|
||||
break;
|
||||
|
||||
case (IIOSF_UNSIGNED_SHORT): {
|
||||
|
Reference in New Issue
Block a user