[augeas-devel] [PATCH] Fix segfault when running 'augtool print'
David Lutterkort
dlutter at redhat.com
Wed Jul 23 17:56:38 UTC 2008
# HG changeset patch
# User David Lutterkort <dlutter at redhat.com>
# Date 1216755414 25200
# Node ID 1af3162133a8a48b3588c957784a7912fd2ba1e2
# Parent 25bd2f0134bc80db2cc8cb22bb19f19d745f942b
Fix segfault when running 'augtool print'
diff -r 25bd2f0134bc -r 1af3162133a8 src/augtool.c
--- a/src/augtool.c Tue Jul 22 12:28:00 2008 -0700
+++ b/src/augtool.c Tue Jul 22 12:36:54 2008 -0700
@@ -46,7 +46,7 @@
char *loadpath = NULL;
static char *cleanpath(char *path) {
- if (strlen(path) == 0)
+ if (path == NULL || strlen(path) == 0)
return path;
char *e = path + strlen(path) - 1;
while (e != path && (*e == SEP || isspace(*e)))
More information about the augeas-devel
mailing list