mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed another buffer underrun
This commit is contained in:
parent
49709e76b9
commit
701c1f222f
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user