summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2014-01-21 14:58:06 -0500
committerMike Blumenkrantz <zmike@samsung.com>2014-01-21 14:58:31 -0500
commit8cbd7c16227f6f40625257a02a026be29a576e0b (patch)
tree2054c711b6a16c0d81b742c5ee5758850b3aaffe /src
parentcff1a9a59f40b1e83ed1db8145108cae53504d4f (diff)
nul terminate string from ecore_x_randr_output_name_get
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_randr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_randr.c b/src/lib/ecore_x/xlib/ecore_x_randr.c
index a88fcff609..b4777772a3 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,
2206 { 2206 {
2207 if (info->name) 2207 if (info->name)
2208 { 2208 {
2209 ret = malloc(info->nameLen); 2209 ret = malloc(info->nameLen + 1);
2210 memcpy(ret, info->name, info->nameLen); 2210 memcpy(ret, info->name, info->nameLen);
2211 ret[info->nameLen] = 0;
2211 if (len) *len = info->nameLen; 2212 if (len) *len = info->nameLen;
2212 } 2213 }
2213 2214