Skip to content

Commit 05252e5

Browse files
TreeHunter9Artyom Ivanov
authored andcommitted
Merge commit from fork
Co-authored-by: Artyom Ivanov <artyom.ivanov@red-soft.ru>
1 parent 7cd7030 commit 05252e5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/common/xdr.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ bool_t xdr_datum( XDR* xdrs, const dsc* desc, UCHAR* buffer)
218218
}
219219
if (!xdr_short(xdrs, reinterpret_cast<SSHORT*>(&n)))
220220
return FALSE;
221+
n = MIN(n, desc->dsc_length - 1);
222+
221223
if (!xdr_opaque(xdrs, reinterpret_cast<SCHAR*>(p), n))
222224
return FALSE;
223225
if (xdrs->x_op == XDR_DECODE)

0 commit comments

Comments
 (0)