From 3d4701a6e41616cf581a297bab1451cf2db70249 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Tue, 14 Jul 2009 13:57:45 +0000 Subject: FS#10080 * Move strncpy() from core to the pluginlib * Introduce strlcpy() and use that instead in most places (use memcpy in a few) in core and some plugins * Drop strncpy() from the codec api as no codec used it * Bump codec and plugin api versions git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21863 a1c6a512-1295-4272-9138-f99709370657 --- apps/debug_menu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/debug_menu.c') diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 60594b677c..648a7e6cae 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c @@ -1910,8 +1910,7 @@ static int disk_callback(int btn, struct gui_synclist *lists) if (card->initialized > 0) { - card_name[6] = '\0'; - strncpy(card_name, ((unsigned char*)card->cid) + 3, 6); + strlcpy(card_name, ((unsigned char*)card->cid) + 3, sizeof(card_name)); simplelist_addline(SIMPLELIST_ADD_LINE, "%s Rev %d.%d", card_name, (int) card_extract_bits(card->cid, 55, 4), -- cgit v1.2.3