discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8cbd7c16227f6f40625257a02a026be29a576e0b

commit 8cbd7c16227f6f40625257a02a026be29a576e0b
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Tue Jan 21 14:58:06 2014 -0500

    nul terminate string from ecore_x_randr_output_name_get
---
 src/lib/ecore_x/xlib/ecore_x_randr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_x/xlib/ecore_x_randr.c 
b/src/lib/ecore_x/xlib/ecore_x_randr.c
index a88fcff..b477777 100644
--- a/src/lib/ecore_x/xlib/ecore_x_randr.c
+++ b/src/lib/ecore_x/xlib/ecore_x_randr.c
@@ -2206,8 +2206,9 @@ ecore_x_randr_output_name_get(Ecore_X_Window root, 
Ecore_X_Randr_Output output,
           {
              if (info->name)
                {
-                  ret = malloc(info->nameLen);
+                  ret = malloc(info->nameLen + 1);
                   memcpy(ret, info->name, info->nameLen);
+                  ret[info->nameLen] = 0;
                   if (len) *len = info->nameLen;
                }
 

-- 


Reply via email to