mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed NULL pointer deference in show_uploader_json
This commit is contained in:
parent
ebcd8ed823
commit
033e292301
@ -27088,6 +27088,8 @@ void show_uploader_json(LOGBOOK *lbs) {
|
|||||||
|
|
||||||
for (i = 0; i < attch_count; i++) {
|
for (i = 0; i < attch_count; i++) {
|
||||||
sprintf(attchname, "attachment%d", i);
|
sprintf(attchname, "attachment%d", i);
|
||||||
|
if (!isparam(attchname))
|
||||||
|
continue;
|
||||||
|
|
||||||
rsprintf(" {\r\n");
|
rsprintf(" {\r\n");
|
||||||
rsprintf(" \"fullName\": \"%s\",\r\n", getparam(attchname));
|
rsprintf(" \"fullName\": \"%s\",\r\n", getparam(attchname));
|
||||||
@ -27108,7 +27110,6 @@ void show_uploader_json(LOGBOOK *lbs) {
|
|||||||
|
|
||||||
rsprintf(" \"contentType\": ");
|
rsprintf(" \"contentType\": ");
|
||||||
|
|
||||||
|
|
||||||
for (j = 0; filetype[j].ext[0]; j++)
|
for (j = 0; filetype[j].ext[0]; j++)
|
||||||
if (chkext(filename, filetype[j].ext))
|
if (chkext(filename, filetype[j].ext))
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user