1
0
Fork 0
mirror of https://github.com/ErikAndren/cue2pops-mac.git synced 2025-04-19 15:38:04 +02:00

Allocate on heap, not on stack

This commit is contained in:
Erik Andrén Zachrisson 2015-11-01 22:36:31 +01:00
parent de659afea1
commit c55fb620f3

View file

@ -1055,7 +1055,14 @@ int main(int argc, char **argv)
for(i = 0; i < bin_size; i += HEADERSIZE) {
if(fix_CDRWIN == 1 && (i + HEADERSIZE >= daTrack_ptr)) {
char padding[(150 * SECTORSIZE) * 2];
char *padding;
padding = malloc((150 * SECTORSIZE) * 2);
if (padding == NULL) {
printf("Failed to allocate padding.\n");
free(outbuf);
return 0;
}
if(debug != 0) {
printf("Padding the CDRWIN dump inside of the virtual CD-ROM image...");