84b277
From 2e13dee991178518480d68e89d323666b047d182 Mon Sep 17 00:00:00 2001
84b277
From: Lukas Nykryn <lnykryn@redhat.com>
84b277
Date: Mon, 24 Feb 2014 17:06:21 +0100
84b277
Subject: [PATCH] udev: properly detect reference to unexisting part of
84b277
 PROGRAM's result
84b277
84b277
(cherry-picked from 66390abefae6530981446970ffd7ff4d1085e254)
84b277
84b277
Resolves: #1147524
84b277
---
84b277
 src/udev/udev-event.c | 2 ++
84b277
 1 file changed, 2 insertions(+)
84b277
84b277
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
84b277
index d69d7ba..aa7c793 100644
84b277
--- a/src/udev/udev-event.c
84b277
+++ b/src/udev/udev-event.c
84b277
@@ -254,6 +254,8 @@ subst:
84b277
                                                 cpos++;
84b277
                                         while (isspace(cpos[0]))
84b277
                                                 cpos++;
84b277
+                                        if (cpos[0] == '\0')
84b277
+                                                break;
84b277
                                 }
84b277
                                 if (i > 0) {
84b277
                                         log_error("requested part of result string not found\n");