fixed potential SIGSEGV because of not checking returned pointer

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4064 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-02-27 18:07:50 +00:00
parent fbcfa78ad9
commit 7c5f54d536

View File

@ -495,6 +495,10 @@ int beMsgMatchString(be_node *n, const char *str, int len)
uint32_t beMsgGetY(be_node *n)
{
be_node *val = beMsgGetDictNode(n, "y");
if(val == NULL)
return BE_Y_UNKNOWN ;
if (val->type != BE_STR)
{
return BE_Y_UNKNOWN;