aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>2011-03-24 14:17:44 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:25 +0200
commitdce81504f91a0db92e0a3cdaa173a5e64cd2c213 (patch)
tree1cdfe9bcf15912ca19dd06162345dd347b19cebe /nx-X11
parent0f7148695beddf0a9fd9803547f48d3db1368c86 (diff)
downloadnx-libs-dce81504f91a0db92e0a3cdaa173a5e64cd2c213.tar.gz
nx-libs-dce81504f91a0db92e0a3cdaa173a5e64cd2c213.tar.bz2
nx-libs-dce81504f91a0db92e0a3cdaa173a5e64cd2c213.zip
FSWrap: fix potential leak in copy_string_list
If list_count is 0, dst would be allocated and leaked. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/lib/X11/FSWrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nx-X11/lib/X11/FSWrap.c b/nx-X11/lib/X11/FSWrap.c
index 35bf33d2a..df65654a9 100644
--- a/nx-X11/lib/X11/FSWrap.c
+++ b/nx-X11/lib/X11/FSWrap.c
@@ -131,7 +131,7 @@ copy_string_list(
char **string_list_ret, **list_src, **list_dst, *dst;
int length, count;
- if (string_list == NULL)
+ if (string_list == NULL || list_count == 0)
return (char **) NULL;
string_list_ret = (char **) Xmalloc(sizeof(char *) * list_count);