[PATCH 17/32] [libx11] Dereferencing possibly NULL "str" in call to function "memcpy" (Deref assumed on the basis of 'nonnull' parameter attribute.)
Erkki Seppälä
erkki.seppala at vincit.fi
Wed Jan 26 23:54:00 PST 2011
If _XkbGetReadBufferPtr returns NULL, goto BAILOUT
Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>
Signed-off-by: Erkki Seppälä <erkki.seppala at vincit.fi>
---
src/xkb/XKBList.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/xkb/XKBList.c b/src/xkb/XKBList.c
index e1b4127..dec96b7 100644
--- a/src/xkb/XKBList.c
+++ b/src/xkb/XKBList.c
@@ -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;
--
1.7.0.4
More information about the xorg-devel
mailing list