From b23e0abac8385132aa2fa2ce5f3ca6a47a8354f9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 21 Sep 2015 15:25:56 +0200 Subject: [PATCH] (libretro-db) Turn some snprintf usage into strlcpy --- libretro-db/query.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libretro-db/query.c b/libretro-db/query.c index 2c24adf7bb..5b3c8e80b9 100644 --- a/libretro-db/query.c +++ b/libretro-db/query.c @@ -72,8 +72,7 @@ struct argument; /* Errors */ static void raise_too_many_arguments(const char **error) { - snprintf(tmp_error_buff, MAX_ERROR_LEN, - "Too many arguments in function call."); + strlcpy(tmp_error_buff, "Too many arguments in function call.", MAX_ERROR_LEN); *error = tmp_error_buff; } @@ -116,7 +115,7 @@ static void raise_unexpected_eof(off_t where, const char **error) static void raise_enomem(const char **error) { - snprintf(tmp_error_buff, MAX_ERROR_LEN, "Out of memory"); + strlcpy(tmp_error_buff, "Out of memory", MAX_ERROR_LEN); *error = tmp_error_buff; }