Fixed snprintf check in tnc-ifmap plugin
authorTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 16:49:16 +0000 (18:49 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 16:49:16 +0000 (18:49 +0200)
src/libcharon/plugins/tnc_ifmap/tnc_ifmap_soap.c

index f535529..b131936 100644 (file)
@@ -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;
                        }