]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] Fix NULL pointer dereference in stats_check_uri_auth(), v2
authorKrzysztof Piotr Oledzki <ole@ans.pl>
Sun, 4 Oct 2009 21:34:15 +0000 (23:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 4 Oct 2009 21:44:45 +0000 (23:44 +0200)
commit6f61b215247ed87371c551fc09457bfdb8b72ddc
treeb3a6376dcbdf252a341a754a547df7315286b098
parentac68c5d92c5cb42b2e2630731eb2faad92c83e72
[BUG] Fix NULL pointer dereference in stats_check_uri_auth(), v2

Recent "struct chunk rework" introduced a NULL pointer dereference
and now haproxy segfaults if auth is required for stats but not found.

The reason is that size_t cannot store negative values, but current
code assumes that "len < 0" == uninitialized.

This patch fixes it.
include/proto/buffers.h
include/types/buffers.h
src/proto_http.c