Skip to content

Commit 39a488a

Browse files
TreeHunter9Artyom Ivanov
authored andcommitted
Merge commit from fork
Co-authored-by: Artyom Ivanov <artyom.ivanov@red-soft.ru>
1 parent 5812426 commit 39a488a

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
@@ -213,6 +213,8 @@ bool_t xdr_datum( xdr_t* xdrs, const dsc* desc, UCHAR* buffer)
213213
}
214214
if (!xdr_short(xdrs, reinterpret_cast<SSHORT*>(&n)))
215215
return FALSE;
216+
n = MIN(n, desc->dsc_length - 1);
217+
216218
if (!xdr_opaque(xdrs, reinterpret_cast<SCHAR*>(p), n))
217219
return FALSE;
218220
if (xdrs->x_op == XDR_DECODE)

0 commit comments

Comments
 (0)