pki: Cast length derived from pointer arithmetic to int
authorTobias Brunner <tobias@strongswan.org>
Wed, 22 Mar 2017 16:30:10 +0000 (17:30 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 23 Mar 2017 17:29:18 +0000 (18:29 +0100)
src/pki/pki.c

index 00fffef..0fdab2a 100644 (file)
@@ -273,7 +273,7 @@ traffic_selector_t* parse_ts(char *str)
        to = strchr(str, '-');
        if (to)
        {
-               snprintf(from, sizeof(from), "%.*s", to - str, str);
+               snprintf(from, sizeof(from), "%.*s", (int)(to - str), str);
                to++;
                return traffic_selector_create_from_string(0, type, from, 0, to, 65535);
        }