From c55fb620f3b732135731a22cde9ddfba5d173b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Andr=C3=A9n=20Zachrisson?= Date: Sun, 1 Nov 2015 22:36:31 +0100 Subject: [PATCH] Allocate on heap, not on stack --- cue2pops.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cue2pops.c b/cue2pops.c index 28984b0..067b023 100644 --- a/cue2pops.c +++ b/cue2pops.c @@ -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...");