asn1: Make sure not to exceed buffer for binary OID
authorTobias Brunner <tobias@strongswan.org>
Mon, 4 Aug 2014 12:10:40 +0000 (14:10 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 9 Sep 2014 08:56:15 +0000 (10:56 +0200)
src/libstrongswan/asn1/asn1.c

index 05be574..00616e5 100644 (file)
@@ -139,7 +139,7 @@ chunk_t asn1_oid_from_string(char *str)
        while (enumerator->enumerate(enumerator, &str))
        {
                val = strtoul(str, &end, 10);
-               if (end == str || pos > buf_len-4)
+               if (end == str || pos > buf_len-5)
                {
                        pos = 0;
                        break;