[PATCH 1/2] hush: do not do anything if string is zero length

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Aleksey Kuleshov <rndfax@xxxxxxxxx>
---
 common/hush.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/common/hush.c b/common/hush.c
index d3f7bf3..d8fd64b 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -1655,6 +1655,9 @@ char *shell_expand(char *str)
 	o_string o = {};
 	char *res, *parsed;
 
+	if (strlen(str) == 0)
+		return xstrdup("");
+
 	remove_quotes_in_str(str);
 
 	o.quote = 1;
-- 
2.8.0.rc3


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux