# HG changeset patch
# User David Lutterkort <[EMAIL PROTECTED]>
# 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)))

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to