[PATCH 26/32] [libx11] Using uninitialized value "conv->state" in call to function "close_converter"
Erkki Seppälä
erkki.seppala at vincit.fi
Wed Jan 26 23:54:09 PST 2011
- Previous message: [PATCH 25/32] [libx11] Variable "wd_array" goes out of scope Value "wd_array" is overwritten in "wd_array = (XPointer*)realloc((char*)info_list->watch_data, (((dpy->watcher_count + 1) * 4U == 0U) ? 1U : ((dpy->watcher_count + 1) * 4U)))"
- Next message: [PATCH 27/32] [libx11] Return value of "XGetWindowProperty(im->core.display, spec->lib_connect_wid, prop, 0L, (length + bytes_after_ret + 3UL) / 4UL, 1, 0UL, &type_ret, &format_ret, &nitems, &bytes_after_ret, &prop_ret)" is not checked
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
From: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>
Fixed by zero'ing conv on allocation. Then close_converter works properly.
Reviewed-by: Erkki Seppälä <erkki.seppala at vincit.fi>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira at nokia.com>
---
modules/lc/def/lcDefConv.c | 2 +-
modules/lc/gen/lcGenConv.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/lc/def/lcDefConv.c b/modules/lc/def/lcDefConv.c
index 5860a79..12a4861 100644
--- a/modules/lc/def/lcDefConv.c
+++ b/modules/lc/def/lcDefConv.c
@@ -577,7 +577,7 @@ create_conv(
XlcConv conv;
State state;
- conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
+ conv = (XlcConv) Xcalloc(1, sizeof(XlcConvRec));
if (conv == NULL)
return (XlcConv) NULL;
diff --git a/modules/lc/gen/lcGenConv.c b/modules/lc/gen/lcGenConv.c
index 074a8d7..baac73a 100644
--- a/modules/lc/gen/lcGenConv.c
+++ b/modules/lc/gen/lcGenConv.c
@@ -2650,7 +2650,7 @@ create_conv(
XlcConv conv;
State state;
- conv = (XlcConv) Xmalloc(sizeof(XlcConvRec));
+ conv = (XlcConv) Xcalloc(1, sizeof(XlcConvRec));
if (conv == NULL)
return (XlcConv) NULL;
--
1.7.0.4
- Previous message: [PATCH 25/32] [libx11] Variable "wd_array" goes out of scope Value "wd_array" is overwritten in "wd_array = (XPointer*)realloc((char*)info_list->watch_data, (((dpy->watcher_count + 1) * 4U == 0U) ? 1U : ((dpy->watcher_count + 1) * 4U)))"
- Next message: [PATCH 27/32] [libx11] Return value of "XGetWindowProperty(im->core.display, spec->lib_connect_wid, prop, 0L, (length + bytes_after_ret + 3UL) / 4UL, 1, 0UL, &type_ret, &format_ret, &nitems, &bytes_after_ret, &prop_ret)" is not checked
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the xorg-devel
mailing list