From 6c3878631123d7a7fc0d9756d1747bc9c640225a Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Mon, 27 Dec 2010 01:29:46 +0000 Subject: [PATCH] CID 2208 and 8119 (both pointing at the same issue): The strlcpy() was using sizeof(char *) instead of the separately supplied textSize argument. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39959 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/keymap/KeyboardLayoutView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/preferences/keymap/KeyboardLayoutView.cpp b/src/preferences/keymap/KeyboardLayoutView.cpp index 2f26a370e8..102926068a 100644 --- a/src/preferences/keymap/KeyboardLayoutView.cpp +++ b/src/preferences/keymap/KeyboardLayoutView.cpp @@ -862,7 +862,7 @@ KeyboardLayoutView::_GetKeyLabel(const Key* key, char* text, size_t textSize, bool hasGlyphs; fBaseFont.GetHasGlyphs(bytes, 1, &hasGlyphs); if (hasGlyphs) - strlcpy(text, bytes, sizeof(text)); + strlcpy(text, bytes, textSize); } }