chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be7f7f5
)
run_program: prevent empty last argv entry
author
Kay Sievers
<kay.sievers@vrfy.org>
Thu, 16 Oct 2008 19:35:11 +0000
(21:35 +0200)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Thu, 16 Oct 2008 19:35:11 +0000
(21:35 +0200)
udev/udev-rules.c
patch
|
blob
|
history
diff --git
a/udev/udev-rules.c
b/udev/udev-rules.c
index 8b94d40c0b57c577c4873f340ac2786151a1c9eb..0bad2171fac554d12340195ac53917733abce937 100644
(file)
--- a/
udev/udev-rules.c
+++ b/
udev/udev-rules.c
@@
-138,9
+138,9
@@
static int run_program(struct udev_device *dev, const char *command,
if (strchr(arg, ' ') != NULL) {
char *pos = arg;
- while (pos != NULL) {
+ while (pos != NULL
&& pos[0] != '\0'
) {
if (pos[0] == '\'') {
- /* do
n't separate if in apostroph
es */
+ /* do
not separate quot
es */
pos++;
argv[i] = strsep(&pos, "\'");
while (pos != NULL && pos[0] == ' ')