mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-11 01:55:38 +08:00
Fix corruption in first line of Waveshare image
This commit is contained in:
parent
778a129f52
commit
cdcfa63cba
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ gdImagePtr img_palettize(gdImagePtr rgb, int * palette, int palette_size) {
|
|||
* Note that we are storing two extra values so we don't have to do boundary checking at
|
||||
* the left and right edges of the image.
|
||||
*/
|
||||
struct ycbcr_t * forward = malloc((gdImageSX(rgb) + 2) * sizeof(struct ycbcr_t));
|
||||
struct ycbcr_t * forward = calloc(gdImageSX(rgb) + 2, sizeof(struct ycbcr_t));
|
||||
if (!forward) {
|
||||
free(pal_ycbcr);
|
||||
gdImageDestroy(res);
|
||||
|
|
Loading…
Reference in a new issue