From: Tobias Brunner Date: Fri, 28 Sep 2012 16:49:16 +0000 (+0200) Subject: Fixed snprintf check in tnc-ifmap plugin X-Git-Tag: 5.0.1~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=027324587767220b4ba2c054a38120e4eedff3d9;p=thirdparty%2Fstrongswan.git Fixed snprintf check in tnc-ifmap plugin --- diff --git a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c index f53552987c..b13193612a 100644 --- a/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c +++ b/src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c @@ -296,7 +296,7 @@ static axiom_node_t* create_ip_address(private_tnc_ifmap_soap_t *this, { written = snprintf(pos, len, "%s%x", first ? "" : ":", 256*address.ptr[i] + address.ptr[i+1]); - if (written < 0 || written > len) + if (written < 0 || written >= len) { break; }