Fixed another buffer underrun

This commit is contained in:
ritt 2022-02-15 18:04:33 +01:00
parent 49709e76b9
commit 701c1f222f

View File

@ -28692,9 +28692,9 @@ void decode_post(char *logbook, LOGBOOK *lbs, char *string, const char *boundary
if (strstr(str, boundary)) if (strstr(str, boundary))
*strstr(str, boundary) = 0; *strstr(str, boundary) = 0;
ptmp = str + (strlen(str) - 1); ptmp = str + (strlen(str) - 1);
while (*ptmp == '-') while (ptmp >= str && *ptmp == '-')
*ptmp-- = 0; *ptmp-- = 0;
while (*ptmp == '\n' || *ptmp == '\r') while (ptmp >= str && (*ptmp == '\n' || *ptmp == '\r'))
*ptmp-- = 0; *ptmp-- = 0;
if (setparam(item, str) == 0) if (setparam(item, str) == 0)