From: David Carlier Date: Wed, 2 Dec 2015 12:05:42 +0000 (+0000) Subject: BUG/MEDIUM: da: stop DeviceAtlas processing in the convertor if there is no input. X-Git-Tag: v1.7-dev1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b7113836db1f4f1bf35b475dceaa7366e90ad8e;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: da: stop DeviceAtlas processing in the convertor if there is no input. 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. --- diff --git a/src/da.c b/src/da.c index e1886b8e85..a214b319cf 100644 --- 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; }