diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/rpc/getnetpath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/rpc/getnetpath.c b/lib/libc/rpc/getnetpath.c index 087cb30..474d3e0 100644 --- a/lib/libc/rpc/getnetpath.c +++ b/lib/libc/rpc/getnetpath.c @@ -249,9 +249,9 @@ int token; /* char to parse string for */ /* * did find a token, but it might be escaped. */ - if (cp[-1] == '\\') { + if ((cp > npp) && (cp[-1] == '\\')) { /* if slash was also escaped, carry on, otherwise find next token */ - if (cp[-2] != '\\') { + if ((cp > npp + 1) && (cp[-2] != '\\')) { /* shift r-o-s onto the escaped token */ strcpy(&cp[-1], cp); /* XXX: overlapping string copy */ /* |