* stack use to the absolute minimum.
*/
typedef struct bgbvr {
- BerElement *ber;
enum bgbvc choice;
+ BerElement *ber;
ber_tag_t tag;
ber_len_t len;
char *last;
case 'v': /* sequence of strings */
{
- bgbvr cookie = { ber, ChArray };
+ bgbvr cookie = { ChArray };
+ cookie.ber = ber;
cookie.res.c = va_arg( ap, char *** );
cookie.alloc = 1;
rc = ber_get_stringbvr( &cookie, 0 );
case 'V': /* sequence of strings + lengths */
{
- bgbvr cookie = { ber, BvVec };
+ bgbvr cookie = { BvVec };
+ cookie.ber = ber;
cookie.res.bv = va_arg( ap, struct berval *** );
cookie.alloc = 1;
rc = ber_get_stringbvr( &cookie, 0 );
case 'W': /* bvarray */
{
- bgbvr cookie = { ber, BvArray };
+ bgbvr cookie = { BvArray };
+ cookie.ber = ber;
cookie.res.ba = va_arg( ap, struct berval ** );
cookie.alloc = 1;
rc = ber_get_stringbvr( &cookie, 0 );
* len ptr on finish. parsed in-place.
*/
{
- bgbvr cookie = { ber, BvOff };
+ bgbvr cookie = { BvOff };
+ cookie.ber = ber;
cookie.res.ba = va_arg( ap, struct berval ** );
cookie.alloc = 0;
l = va_arg( ap, ber_len_t * );