From 90c0eb15a45ce02a0bdd48c70c17bf31c4931f90 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 12 Aug 2014 10:11:41 +0100 Subject: [PATCH] Evas textblock: strcpy->strncpy (although the buffer is always big enough). Many tools will complain about the use of strcpy, and it's not that hard to use strncpy anyway. CID1039581. --- src/lib/evas/canvas/evas_object_textblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 8e0338556b..930c94be95 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -6137,7 +6137,7 @@ _escaped_char_get(const char *s, const char *s_end) return NULL; utf8_char = eina_unicode_unicode_to_utf8(uchar, NULL); - strcpy(utf8_escape, utf8_char); + strncpy(utf8_escape, utf8_char, sizeof(utf8_escape)); free(utf8_char); return utf8_escape;