better check the size of the chars table for keymaps. this avoids crashing in #2659.

dunno why the keymap is invalid though


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27183 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2008-08-24 12:28:27 +00:00
parent ded820241d
commit 65e6fe82ad

View File

@ -298,6 +298,8 @@ InputServer::_LoadKeymap()
return B_BAD_VALUE;
fCharsSize = B_BENDIAN_TO_HOST_INT32(fCharsSize);
if (fCharsSize <= 0)
return B_BAD_VALUE;
delete[] fChars;
fChars = new (nothrow) char[fCharsSize];