Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82407
b: refs/heads/master
c: e5cff48
h: refs/heads/master
i:
  82405: 8161b0a
  82403: 23a1926
  82399: 9c1ece6
v: v3
  • Loading branch information
Chuck Lever authored and J. Bruce Fields committed Feb 1, 2008
1 parent fc833fc commit 0db554d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 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: 01b2969a8528b926f5e4d98161ae37053234475c
refs/heads/master: e5cff482c78a35b9f149a06aa777a1bd693864fb
3 changes: 2 additions & 1 deletion trunk/include/linux/sunrpc/xdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ struct xdr_buf {
__be32 *xdr_encode_opaque_fixed(__be32 *p, const void *ptr, unsigned int len);
__be32 *xdr_encode_opaque(__be32 *p, const void *ptr, unsigned int len);
__be32 *xdr_encode_string(__be32 *p, const char *s);
__be32 *xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen);
__be32 *xdr_decode_string_inplace(__be32 *p, char **sp, unsigned int *lenp,
unsigned int maxlen);
__be32 *xdr_encode_netobj(__be32 *p, const struct xdr_netobj *);
__be32 *xdr_decode_netobj(__be32 *p, struct xdr_netobj *);

Expand Down
8 changes: 5 additions & 3 deletions trunk/net/sunrpc/xdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ xdr_encode_string(__be32 *p, const char *string)
EXPORT_SYMBOL(xdr_encode_string);

__be32 *
xdr_decode_string_inplace(__be32 *p, char **sp, int *lenp, int maxlen)
xdr_decode_string_inplace(__be32 *p, char **sp,
unsigned int *lenp, unsigned int maxlen)
{
unsigned int len;
u32 len;

if ((len = ntohl(*p++)) > maxlen)
len = ntohl(*p++);
if (len > maxlen)
return NULL;
*lenp = len;
*sp = (char *) p;
Expand Down

0 comments on commit 0db554d

Please sign in to comment.