projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9d3a85
)
libxl: don't check s!=NULL in libxl__abs_path
author
Wei Liu
<wei.liu2@citrix.com>
Tue, 14 Jul 2015 16:41:04 +0000
(17:41 +0100)
committer
Ian Campbell
<ian.campbell@citrix.com>
Wed, 15 Jul 2015 09:56:04 +0000
(10:56 +0100)
That argument should not be NULL. Let subsequent dereferencing crashes
the process.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_internal.c
patch
|
blob
|
history
diff --git
a/tools/libxl/libxl_internal.c
b/tools/libxl/libxl_internal.c
index 42d548eb54f550e3ddad869fffafbaa4e4827eb1..24a09010e961437d24d3e64ae75980cb0321c2b8 100644
(file)
--- a/
tools/libxl/libxl_internal.c
+++ b/
tools/libxl/libxl_internal.c
@@
-233,8
+233,7
@@
void libxl__log(libxl_ctx *ctx, xentoollog_level msglevel, int errnoval,
char *libxl__abs_path(libxl__gc *gc, const char *s, const char *path)
{
- if (!s || s[0] == '/')
- return libxl__strdup(gc, s);
+ if (s[0] == '/') return libxl__strdup(gc, s);
return libxl__sprintf(gc, "%s/%s", path, s);
}