xdr-mem-take-II-20030321

Fix pasto in xdr_mem security patch.
This commit is contained in:
Dan Hyde 2003-03-21 19:26:36 +00:00 committed by Jim Rees
parent 38cec12f2c
commit eede2119c3

View File

@ -87,7 +87,7 @@ static void xdrmem_destroy(void)
static bool_t xdrmem_getint32(register XDR *xdrs, afs_int32 *lp)
{
if (xdrs->x_handy -= sizeof(afs_int32))
if (xdrs->x_handy < sizeof(afs_int32))
return (FALSE);
else
xdrs->x_handy -= sizeof(afs_int32);
@ -98,7 +98,7 @@ static bool_t xdrmem_getint32(register XDR *xdrs, afs_int32 *lp)
static bool_t xdrmem_putint32(register XDR *xdrs, afs_int32 *lp)
{
if (xdrs->x_handy -= sizeof(afs_int32))
if (xdrs->x_handy < sizeof(afs_int32))
return (FALSE);
else
xdrs->x_handy -= sizeof(afs_int32);