frankmorgner/OpenSC — comment on commit 48f8f982a09e5a484ff4951609ebfcabf8d99bfc
File:  line 0
By frankmorgner:

The context isn't used anyway and no, the buffer is not limited in size. One solution, Rewrite sc_hex_dump:

from
void sc_hex_dump(struct sc_context *ctx, int level, const u8 * in, size_t count, char *buf, size_t len)
to
void _sc_hex_dump(const u8 * in, size_t count, char *buf, size_t len)

and for backward compatibility use
#define sc_hex_dump(ctx, level, in, count, buf, len) _sc_hex_dump(in, count, buf, len)

Now use _sc_hex_dump to format your buffer in pkcs11-display.c and print it by hand. While you're at it you can rewrite sc_dump_hex to use _sc_hex_dump instead.