From 7024d238471d29e2784c274a0ba9f25fbea3b5ad Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Thu, 6 Apr 2017 21:20:11 +1000 Subject: [PATCH] Fix crash in fileapprove --- utils/fileapprove/fileapprove.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/utils/fileapprove/fileapprove.c b/utils/fileapprove/fileapprove.c index f789eb6..133c956 100644 --- a/utils/fileapprove/fileapprove.c +++ b/utils/fileapprove/fileapprove.c @@ -165,19 +165,7 @@ int main(int argc, char **argv) { TRUE, TRUE); drawCDKLabel(instructions, TRUE); - scrollList = newCDKScroll(cdkscreen, - 2, - 1, - 1, - 36, - 36, - title, - NULL, - 0, - FALSE, - A_REVERSE, - TRUE, - TRUE); + scrollList = newCDKScroll(cdkscreen, 2, 1, 1, 36, 36, title, NULL, 0, FALSE, A_REVERSE, TRUE, TRUE); if (scrollList == 0) { fprintf(stderr, "Unable to make scrolllist!"); destroyCDKScreen(cdkscreen); @@ -230,7 +218,7 @@ int main(int argc, char **argv) { f[fcount]->description = strdup((char *)sqlite3_column_text(res, 1)); f[fcount]->approved = sqlite3_column_int(res, 2); - filenames[fcount] = (char *)malloc(strlen(basename(f[fcount]->name) + 30)); + filenames[fcount] = (char *)malloc(strlen(basename(f[fcount]->name)) + 30); if (stat(f[fcount]->name, &s) != 0) { sprintf(filenames[fcount], "%s (missing)", basename(f[fcount]->name)); if (f[fcount]->approved == 1) {