Signed-off-by: Alan Coopersmith <[email protected]>
---
 src/xlibi18n/XDefaultIMIF.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/xlibi18n/XDefaultIMIF.c b/src/xlibi18n/XDefaultIMIF.c
index 4e75fa0..7c32ce2 100644
--- a/src/xlibi18n/XDefaultIMIF.c
+++ b/src/xlibi18n/XDefaultIMIF.c
@@ -202,9 +202,8 @@ _XDefaultOpenIM(
        }
     }
 #undef MODIFIER
-    if ((im->core.im_name = Xmalloc(i+1)) == NULL)
+    if ((im->core.im_name = strdup(buf)) == NULL)
        goto Error;
-    strcpy(im->core.im_name, buf);
 
     im->methods        = (XIMMethods)&local_im_methods;
     im->core.lcd       = lcd;
-- 
2.6.1

_______________________________________________
[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