ASN1: Fix stack variable overwrite when encoding OID.
authorKp <kp@valhallalegends.com>
Sat, 31 May 2008 21:37:45 +0000 (16:37 -0500)
committerKp <kp@valhallalegends.com>
Mon, 1 Sep 2008 19:48:41 +0000 (14:48 -0500)
commitebfe5dc8641467efea3506a4797a2b1260b2da55
tree7d1878aa92894f867a3c497d41821497f45b8ccc
parent41bac7b295aab8a09a1add8ca02db472fcd31184
ASN1: Fix stack variable overwrite when encoding OID.

The call to sscanf specifies a format string of "%lu", a long unsigned
int.  The pointer argument was cast to unsigned long *, but this is
wrong for 64 bit systems.  On 64 bit systems, unsigned long is 64 bits,
but the oid value is a SilcUInt32 on all systems.  As a result, sscanf
will overwrite a neighboring variable on the stack.  Fix this by
changing the format string to "%u" and removing the cast.
lib/silcasn1/silcasn1_encode.c