Fixed NULL pointer deference in show_uploader_json

This commit is contained in:
2020-02-11 11:15:35 +01:00
parent ebcd8ed823
commit 033e292301
+2 -1
View File
@@ -27088,6 +27088,8 @@ void show_uploader_json(LOGBOOK *lbs) {
for (i = 0; i < attch_count; i++) {
sprintf(attchname, "attachment%d", i);
if (!isparam(attchname))
continue;
rsprintf(" {\r\n");
rsprintf(" \"fullName\": \"%s\",\r\n", getparam(attchname));
@@ -27108,7 +27110,6 @@ void show_uploader_json(LOGBOOK *lbs) {
rsprintf(" \"contentType\": ");
for (j = 0; filetype[j].ext[0]; j++)
if (chkext(filename, filetype[j].ext))
break;