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
This commit is contained in:
Michael Lotz 2010-12-27 01:29:46 +00:00
parent f3eff1ca00
commit 6c38786311

View File

@ -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);
}
}