mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
calloc
This commit is contained in:
parent
18fd68900d
commit
d6a01789e2
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ static uint8_t * map8to1(gdImagePtr img, int color) {
|
|||
// Calculate width rounding up
|
||||
uint16_t width8 = (gdImageSX(img) + 7) / 8;
|
||||
|
||||
uint8_t * colormap8 = malloc(width8 * gdImageSY(img));
|
||||
uint8_t * colormap8 = calloc(width8 * gdImageSY(img), sizeof(uint8_t));
|
||||
if (!colormap8) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue