ITS#2490 - allow retry for incomplete reads of BER tag & len

This commit is contained in:
Howard Chu 2003-05-19 10:33:18 +00:00
parent ea8e28c6c1
commit 9757665aed

View file

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