Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217213
b: refs/heads/master
c: e7f483e
h: refs/heads/master
i:
  217211: 2051a67
v: v3
  • Loading branch information
Andy Shevchenko authored and J. Bruce Fields committed Sep 22, 2010
1 parent 191b195 commit d830295
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1117449276bb909b029ed0b9ba13f53e4784db9d
refs/heads/master: e7f483eabea8ef6d2b5ce1b74c8184cc06819f15
20 changes: 13 additions & 7 deletions trunk/net/sunrpc/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,13 +1179,19 @@ int qword_get(char **bpp, char *dest, int bufsize)
if (bp[0] == '\\' && bp[1] == 'x') {
/* HEX STRING */
bp += 2;
while (isxdigit(bp[0]) && isxdigit(bp[1]) && len < bufsize) {
int byte = isdigit(*bp) ? *bp-'0' : toupper(*bp)-'A'+10;
bp++;
byte <<= 4;
byte |= isdigit(*bp) ? *bp-'0' : toupper(*bp)-'A'+10;
*dest++ = byte;
bp++;
while (len < bufsize) {
int h, l;

h = hex_to_bin(bp[0]);
if (h < 0)
break;

l = hex_to_bin(bp[1]);
if (l < 0)
break;

*dest++ = (h << 4) | l;
bp += 2;
len++;
}
} else {
Expand Down

0 comments on commit d830295

Please sign in to comment.