mirror of
https://gitea.psi.ch/ELOG/elog.git
synced 2026-09-08 17:13:56 +00:00
Fixed buffer overflow with very long cookies
SVN revision: 2146
This commit is contained in:
parent
e0587f069b
commit
3265673386
@ -26557,7 +26557,7 @@ int process_http_request(const char *request, int i_conn)
|
||||
if (str[i] == '=') {
|
||||
str[i] = 0;
|
||||
p += i + 1;
|
||||
for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n'; i++)
|
||||
for (i = 0; *p && *p != ';' && *p != '\r' && *p != '\n' && i < (int) sizeof(cookie)-1; i++)
|
||||
cookie[i] = *p++;
|
||||
cookie[i] = 0;
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user