From 998db7a76fc575e5e1f63927d42da076d723ef4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 27 Nov 2006 10:32:21 +0000 Subject: [PATCH] (der_print_heim_oid): oid with zero length is invalid, fail to print. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19138 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/asn1/der_format.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/asn1/der_format.c b/lib/asn1/der_format.c index 4ef50b15c..d4f40a256 100644 --- a/lib/asn1/der_format.c +++ b/lib/asn1/der_format.c @@ -110,6 +110,9 @@ der_print_heim_oid (const heim_oid *oid, char delim, char **str) struct rk_strpool *p = NULL; int i; + if (oid->length == 0) + return EINVAL; + for (i = 0; i < oid->length ; i++) { p = rk_strpoolprintf(p, "%d", oid->components[i]); if (p && i < oid->length - 1)