Merge pull request #8413 from radarhere/sgirle_memory

This commit is contained in:
Hugo van Kemenade 2024-10-01 13:52:22 +03:00 committed by GitHub
commit ea15e0e622
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -195,6 +195,7 @@ ImagingSgiRleDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t
}
_imaging_seek_pyFd(state->fd, SGI_HEADER_SIZE, SEEK_SET);
if (_imaging_read_pyFd(state->fd, (char *)ptr, c->bufsize) != c->bufsize) {
free(ptr);
state->errcode = IMAGING_CODEC_UNKNOWN;
return -1;
}