fix two problems found by clang static analyzer

secure.c:  Dereference of null pointer
xkeymap.c: Pass-by-value argument in function call is undefined

both seem to be noncritical, as sec_recv is never called with a null
pointer and ensure_remote_modifiers only accesses initialized fields


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1589 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Michael Gernoth 2010-04-07 11:39:29 +00:00
parent d9f454b2ad
commit 360b4a3faa
2 changed files with 3 additions and 2 deletions

View File

@ -825,7 +825,8 @@ sec_recv(uint8 * rdpver)
if (channel != MCS_GLOBAL_CHANNEL)
{
channel_process(s, channel);
*rdpver = 0xff;
if (rdpver != NULL)
*rdpver = 0xff;
return s;
}

View File

@ -820,7 +820,7 @@ save_remote_modifiers(uint8 scancode)
void
restore_remote_modifiers(uint32 ev_time, uint8 scancode)
{
key_translation dummy;
key_translation dummy = { };
if (is_modifier(scancode))
return;