Make sure first argument is an int when using %.*s to print e.g. chunks
[strongswan.git] / src / libstrongswan / plugins / openssl / openssl_rsa_private_key.c
index d1afd94..98cd700 100644 (file)
@@ -475,7 +475,8 @@ static bool login(ENGINE *engine, chunk_t keyid)
        {
                found = TRUE;
                key = shared->get_key(shared);
-               if (snprintf(pin, sizeof(pin), "%.*s", key.len, key.ptr) >= sizeof(pin))
+               if (snprintf(pin, sizeof(pin),
+                                        "%.*s", (int)key.len, key.ptr) >= sizeof(pin))
                {
                        continue;
                }