[systemd-devel] [PATCH] shared: fix broken string_is_safe

Martin Mikkelsen mamikk at mamikk.no
Thu Oct 4 05:27:29 PDT 2012


---
 src/shared/util.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shared/util.c b/src/shared/util.c
index 64d6e62..6310aec 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -5879,10 +5879,10 @@ bool string_is_safe(const char *p) {
         assert(p);
 
         for (t = p; *t; t++) {
-                if (*p < ' ')
+                if (*t < ' ')
                         return false;
 
-                if (strchr("\\\"\'", *p))
+                if (strchr("\\\"\'", *t))
                         return false;
         }
 
-- 
1.7.1



More information about the systemd-devel mailing list