[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ber_scanf and ber_printf strangeness

Howard Chu wrote:
Szombathelyi György wrote:

I'm developing kldap, a Qt wrapper for LDAP-functions. When I tested ber_scanf and ber_printf functions, I found this strangeness:
Encode a sequence of octet strings via ber_printf
But decoding only succeeds if I use the following scanf formats:
ber_scanf(ber,"v",...) - yes, without '{}', or
ber_scanf(ber,"{ooo}") As I read the ber_scanf man page, 'v' format actually decodes a sequence of octet strings, so my examples are correct according to these. But the code example on the end shows that '{v}' should be used. So what is the right way?

It looks like the manpage example is wrong.

I take that back. The example matches the ldap-c-api draft document. The liblber code matches as well.

Seems your version of liblber is broken, or you're not calling ber_scanf with the right arguments.
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/