From 670febf7d5b4c2aa399a1e5cfba1336b8c62b935 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 24 Aug 2007 21:58:20 +0000 Subject: [PATCH] ITS#5105 from Alexey Melnikov @ isode --- libraries/liblber/bprint.c | 14 +++++++------- libraries/liblber/decode.c | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libraries/liblber/bprint.c b/libraries/liblber/bprint.c index 9bfc34f01e..51a958f0ab 100644 --- a/libraries/liblber/bprint.c +++ b/libraries/liblber/bprint.c @@ -265,10 +265,10 @@ ber_dump( len = ber_pvt_ber_write(ber); } - sprintf( buf, "ber_dump: buf=0x%08lx ptr=0x%08lx end=0x%08lx len=%ld\n", - (long) ber->ber_buf, - (long) ber->ber_ptr, - (long) ber->ber_end, + sprintf( buf, "ber_dump: buf=%p ptr=%p end=%p len=%ld\n", + ber->ber_buf, + ber->ber_ptr, + ber->ber_end, (long) len ); (void) (*ber_pvt_log_print)( buf ); @@ -303,10 +303,10 @@ ber_sos_dump( (*ber_pvt_log_print)( "*** sos dump ***\n" ); while ( sos != NULL ) { - sprintf( buf, "ber_sos_dump: clen %ld first 0x%lx ptr 0x%lx\n", + sprintf( buf, "ber_sos_dump: clen %ld first %p ptr %p\n", (long) sos->sos_clen, - (long) sos->sos_first, - (long) sos->sos_ptr ); + sos->sos_first, + sos->sos_ptr ); (*ber_pvt_log_print)( buf ); sprintf( buf, " current len %ld contents:\n", diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index 3c2c780e3a..f2261e7bd5 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -419,7 +419,7 @@ ber_get_stringbvl( bgbvr *b, ber_len_t *rlen ) case BvOff: *b->res.ba = ber_memalloc_x( (n+1) * b->siz, b->ber->ber_memctx ); if ( *b->res.ba == NULL ) return LBER_DEFAULT; - ((struct berval *)((long)(*b->res.ba) + n*b->siz + + ((struct berval *)((char *)(*b->res.ba) + n*b->siz + b->off))->bv_val = NULL; break; } @@ -452,7 +452,7 @@ ber_get_stringbvl( bgbvr *b, ber_len_t *rlen ) *bvp = bv; break; case BvOff: - *(BerVarray)((long)(*b->res.ba)+n*b->siz+b->off) = bv; + *(BerVarray)((char *)(*b->res.ba)+n*b->siz+b->off) = bv; break; } } -- 2.39.5