From 5f79d72c436e9433080feff93be965ec79b17ec2 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Thu, 7 Jul 2005 16:02:03 +0200 Subject: [PATCH] fix unquoted strings in udevinitsend Signed-off-by: Kay Sievers --- udevinitsend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/udevinitsend.c b/udevinitsend.c index 26ae5c84..204e9cec 100644 --- a/udevinitsend.c +++ b/udevinitsend.c @@ -132,11 +132,11 @@ static int udevsend(char *filename, int sock, int disable_loop_detection) strncpy(&usend_msg.envbuf[bufpos],ls,(ch - ls) + 1); bufpos += (ch - ls) + 1; if (ch[1] == '\'' && le[-1] == '\'') { - strncpy(&usend_msg.envbuf[bufpos],ch + 2, (le - ch) -3); + strncpy(&usend_msg.envbuf[bufpos],ch + 2, (le - ch) - 3); bufpos += (le - ch) - 3; } else { - strncpy(&usend_msg.envbuf[bufpos],ch, (le - ch)); - bufpos += (le - ch); + strncpy(&usend_msg.envbuf[bufpos],ch + 1, (le - ch) - 1); + bufpos += (le - ch) - 1; } bufpos++; } -- 2.39.5