diff options
Diffstat (limited to 'net/sunrpc/cache.c')
-rw-r--r-- | net/sunrpc/cache.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 5199bb1a017e..2928afffbb81 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -1072,10 +1072,12 @@ void qword_add(char **bpp, int *lp, char *str) | |||
1072 | 1072 | ||
1073 | if (len < 0) return; | 1073 | if (len < 0) return; |
1074 | 1074 | ||
1075 | ret = string_escape_str(str, &bp, len, ESCAPE_OCTAL, "\\ \n\t"); | 1075 | ret = string_escape_str(str, bp, len, ESCAPE_OCTAL, "\\ \n\t"); |
1076 | if (ret < 0 || ret == len) | 1076 | if (ret >= len) { |
1077 | bp += len; | ||
1077 | len = -1; | 1078 | len = -1; |
1078 | else { | 1079 | } else { |
1080 | bp += ret; | ||
1079 | len -= ret; | 1081 | len -= ret; |
1080 | *bp++ = ' '; | 1082 | *bp++ = ' '; |
1081 | len--; | 1083 | len--; |