mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
xdr_mbuf.c: Add a check for the return value for xdrmbuf_getbytes()
The xdrmbuf_getlong() function failed to check for the return value from xdrmbuf_getbytes(). This could have resulted in a failure during NFS RPC message processing. Reviewed by: rmacklem MFC after: 2 weeks Sponsored by: VersatusHPC
This commit is contained in:
1 parent
12f90bbd30
commit
cf59649539
1 file changed
+2
-1
+2
-1
@@ -151,7 +151,8 @@ xdrmbuf_getlong(XDR *xdrs, long *lp)
|
||||
if (p) {
|
||||
t = *p;
|
||||
} else {
|
||||
xdrmbuf_getbytes(xdrs, (char *) &t, sizeof(int32_t));
|
||||
if (!xdrmbuf_getbytes(xdrs, (char *) &t, sizeof(int32_t)))
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
*lp = ntohl(t);
|
||||
|
||||
Reference in new issue
Block a user