From: Tobias Brunner Date: Wed, 22 Mar 2017 16:30:10 +0000 (+0100) Subject: pki: Cast length derived from pointer arithmetic to int X-Git-Tag: 5.5.2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c9418ac4dd9e2e669d93c21c777eee2fc68017e;p=thirdparty%2Fstrongswan.git pki: Cast length derived from pointer arithmetic to int --- diff --git a/src/pki/pki.c b/src/pki/pki.c index 00fffefa69..0fdab2aab1 100644 --- a/src/pki/pki.c +++ b/src/pki/pki.c @@ -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); }