# HG changeset patch # User Paper <37962225+mrpapersonic@users.noreply.github.com> # Date 1653042809 14400 # Node ID 4f005d28d912de8cece572007cee38a912c1bded # Parent 9b309701420e39f0998ef0bf992f458e030db063 gah,, diff -r 9b309701420e -r 4f005d28d912 src/main.c --- a/src/main.c Fri May 20 06:27:30 2022 -0400 +++ b/src/main.c Fri May 20 06:33:29 2022 -0400 @@ -149,7 +149,7 @@ } fflush(stdout); if (strcmp(args.output, " ") == 0) { /* string manipulation hell */ - char temp* = (char*)malloc(sizeof(char)*256); + char temp* = (char*)calloc(256, sizeof(char)); temp[0] = '\0'; char str_version[16]; sprintf(str_version, "V%d", args.version); @@ -160,6 +160,7 @@ strncat(temp, ".", 1); strncat(temp, args.type, 3); strncpy(args.output, temp, 255); + free(temp); } if (strcmp(args.type, "veg") == 0) { const unsigned char T[] = {0xEF, 0x29, 0xC4, 0x46, 0x4A, 0x90, 0xD2, 0x11, 0x87, 0x22, 0x00, 0xC0, 0x4F, 0x8E, 0xDB, 0x8A};