From ecc773c38f50dea03369d2ff59aa48c2f7e4f179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Andr=C3=A9n=20Zachrisson?= Date: Sun, 1 Nov 2015 12:53:06 +0100 Subject: [PATCH] Check if the headerbuf malloc succeeded --- cue2pops.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cue2pops.c b/cue2pops.c index 642bdef..d883c3c 100644 --- a/cue2pops.c +++ b/cue2pops.c @@ -544,6 +544,10 @@ int main(int argc, char **argv) } headerbuf = malloc(HEADERSIZE * 2); + if (headerbuf == NULL) { + printf("Error: Failed to allocate header buffer\n"); + return 0; + } /******************************************************************************************************* ********************************************************************************************************