If _XkbGetReadBufferPtr returns NULL, goto BAILOUT

Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
Signed-off-by: Erkki Seppälä <[email protected]>
---
 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

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to