]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: da: stop DeviceAtlas processing in the convertor if there is no input.
authorDavid Carlier <dcarlier@afilias.info>
Wed, 2 Dec 2015 12:05:42 +0000 (12:05 +0000)
committerWilly Tarreau <w@1wt.eu>
Thu, 3 Dec 2015 10:37:01 +0000 (11:37 +0100)
In case a HTTP header modifier, like req*del, is used, the User-Agent would be removed
and cause a segfault, hence the work is stopped in due time.

src/da.c

index e1886b8e85ede1ab5ed54ce600157db6a5cc3190..a214b319cf6f8da802f00dcf5c1e2f6dad8b27b7 100644 (file)
--- a/src/da.c
+++ b/src/da.c
@@ -232,7 +232,7 @@ static int da_haproxy_conv(const struct arg *args, struct sample *smp, void *pri
        char useragentbuf[1024] = { 0 };
        int i;
 
-       if (global.deviceatlas.daset == 0) {
+       if (global.deviceatlas.daset == 0 || smp->data.u.str.len == 0) {
                return 1;
        }