mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Fix reading multibyte lengths
This commit is contained in:
parent
71e0359f37
commit
13aa48e47a
1 changed files with 9 additions and 2 deletions
|
|
@ -551,12 +551,19 @@ ber_get_next(
|
|||
return LBER_DEFAULT;
|
||||
}
|
||||
}
|
||||
if (sblen == 1) continue;
|
||||
|
||||
ber->ber_tag = tag;
|
||||
ber->ber_ptr = (char *)p;
|
||||
}
|
||||
|
||||
if ( ber->ber_ptr == ber->ber_rwptr ) {
|
||||
#if defined( EWOULDBLOCK )
|
||||
errno = EWOULDBLOCK;
|
||||
#elif defined( EAGAIN )
|
||||
errno = EAGAIN;
|
||||
#endif
|
||||
return LBER_DEFAULT;
|
||||
}
|
||||
|
||||
/* Now look for the length */
|
||||
if (*ber->ber_ptr & 0x80) { /* multi-byte */
|
||||
ber_len_t i;
|
||||
|
|
|
|||
Loading…
Reference in a new issue