From: David Lutterkort <[email protected]>

---
 src/pathx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/pathx.c b/src/pathx.c
index 22b5a57..8775be8 100644
--- a/src/pathx.c
+++ b/src/pathx.c
@@ -2054,6 +2054,8 @@ static void store_error(struct pathx *pathx) {
             strcat(pos_str, " in ");
             strncat(pos_str, path, pos);
         } else {
+            /* initialize pos_str explicitly, path might be "" */
+            pos_str[0] = '\0';
             strncpy(pos_str, path, pos);
         }
         strcat(pos_str, "|=|");
-- 
1.7.3.4

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

Reply via email to