From 8ffdc6663b620c386d6b277d7e70359dcdb2b254 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 29 Aug 2016 21:21:07 +0200 Subject: [PATCH] (cheevos) try to avoid sprintf --- cheevos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheevos.c b/cheevos.c index 8a8d8c04e5..41d1529d3c 100644 --- a/cheevos.c +++ b/cheevos.c @@ -1359,7 +1359,7 @@ static void cheevos_url_encode(const char *str, char *encoded, size_t len) { if (len >= 4) { - sprintf(encoded, "%%%02x", (uint8_t)*str); + snprintf(encoded, len, "%%%02x", (uint8_t)*str); encoded += 3; str++; len -= 3;