]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: uri_auth: missing NULL check and memory leak on memory shortage
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Jan 2013 01:26:43 +0000 (02:26 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 24 Jan 2013 15:19:19 +0000 (16:19 +0100)
commit0b291bdef1b9b6b539f44aa896eb1211c57a67a5
tree0dba3b09b6c44a44b808ee3a12004d3468589ad8
parentde2dd6b1250579c46ff085d8dad760d6d5ca9407
BUG/MEDIUM: uri_auth: missing NULL check and memory leak on memory shortage

A test is obviously wrong in uri_auth(). If strdup(pass) returns an error
while strdup(user) passes, the NULL pointer is still stored into the
structure. If the user returns the NULL instead, the allocated memory is
not released before returning the error.

The issue was present in 1.4 so the fix should be backported.

Reported-by: Dinko Korunic <dkorunic@reflected.net>
src/uri_auth.c