Fix reading multibyte lengths

This commit is contained in:
Howard Chu 2003-05-22 06:24:23 +00:00
parent 71e0359f37
commit 13aa48e47a

View file

@ -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;