mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
Fix integer overflow, CVE-2008-1771
Fix integer overflow leading to heap-based buffer overflow causing a remote Denial of Service and possibly allows to execute arbitrary code.
This commit is contained in:
parent
5d227e85c5
commit
567bd3ee03
@ -716,7 +716,12 @@ int ws_getpostvars(WS_CONNINFO *pwsc) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
length=atoi(content_length);
|
||||
length=strtol(content_length, NULL, 10);
|
||||
if(EINVAL == errno || UINT_MAX - 1 <= length){
|
||||
ws_dprintf(L_WS_WARN, "Thread %d: Suspicious Content-Length value, ignoring request\n", pwsc->threadno);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ws_dprintf(L_WS_DBG,"Thread %d: Post var length: %d\n",
|
||||
pwsc->threadno,length);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user