Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: dhcp.c

Issue 6873012: CHROMIUMOS: Escape | and & characters when passing to the shell. (Closed) Base URL: http://git.chromium.org/git/dhcpcd.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dhcp.c
diff --git a/dhcp.c b/dhcp.c
index c388cb93e346d9895765a25ab7b803ed5818f967..7d2c25b67937a03962f640b1a03cc3660ac2cc21 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -1140,7 +1140,9 @@ print_string(char *s, ssize_t len, int dl, const uint8_t *data)
case '\'': /* FALLTHROUGH */
case '$': /* FALLTHROUGH */
case '`': /* FALLTHROUGH */
- case '\\':
+ case '\\': /* FALLTHROUGH */
+ case '|': /* FALLTHROUGH */
+ case '&':
if (s) {
if (len < 3) {
errno = ENOBUFS;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698