mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-06 15:10:22 -05:00
ITS#2490 - allow retry for incomplete reads of BER tag & len
This commit is contained in:
parent
ea8e28c6c1
commit
9757665aed
1 changed files with 7 additions and 2 deletions
|
|
@ -543,10 +543,10 @@ ber_get_next(
|
|||
return LBER_DEFAULT;
|
||||
}
|
||||
}
|
||||
if (sblen == 1) continue;
|
||||
|
||||
ber->ber_tag = tag;
|
||||
ber->ber_ptr = (char *)p;
|
||||
|
||||
if (sblen == 1) continue;
|
||||
}
|
||||
|
||||
/* Now look for the length */
|
||||
|
|
@ -559,6 +559,11 @@ ber_get_next(
|
|||
}
|
||||
/* Not enough bytes? */
|
||||
if (ber->ber_rwptr - ber->ber_ptr < llen) {
|
||||
#if defined( EWOULDBLOCK )
|
||||
errno = EWOULDBLOCK;
|
||||
#elif defined( EAGAIN )
|
||||
errno = EAGAIN;
|
||||
#endif
|
||||
return LBER_DEFAULT;
|
||||
}
|
||||
for (i=0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue