Dereferencing possibly NULL "str" in call to function "memcpy" (Deref assumed on the basis of 'nonnull' parameter attribute.)

If _XkbGetReadBufferPtr returns NULL, goto BAILOUT

Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
This commit is contained in:
Erkki Seppälä 2011-01-27 09:54:00 +02:00
parent 59da8a211e
commit 0edb76d1d5

View file

@ -79,6 +79,8 @@ char * str;
if (!this->name)
goto BAILOUT;
str= (char *)_XkbGetReadBufferPtr(buf,wlen);
if (!str)
goto BAILOUT;
memcpy(this->name,str,slen);
}
return first;