[systemd-devel] [PATCH] udev: properly detect reference to unexisting part of PROGRAM's result

Lukas Nykryn lnykryn at redhat.com
Mon Feb 24 07:56:53 PST 2014


---
 src/udev/udev-event.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 0b3ade0..de31fee 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -254,6 +254,8 @@ subst:
                                                 cpos++;
                                         while (isspace(cpos[0]))
                                                 cpos++;
+                                        if (cpof[0] == '\0')
+                                                break;
                                 }
                                 if (i > 0) {
                                         log_error("requested part of result string not found");
-- 
1.8.4.2



More information about the systemd-devel mailing list