From 548ec1a8061dee6d094592b4c8787863d9551183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sat, 2 Dec 2006 08:49:16 +0000 Subject: [PATCH] Check if header is there git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19200 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/des/rsa-imath.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/des/rsa-imath.c b/lib/des/rsa-imath.c index 4e445db78..bdd087f84 100644 --- a/lib/des/rsa-imath.c +++ b/lib/des/rsa-imath.c @@ -187,6 +187,8 @@ imath_rsa_public_decrypt(int flen, const unsigned char* from, mp_int_clear(&us); /* head zero was skipped by mp_int_to_unsigned */ + if (*p == 0) + return -7; if (*p != 1) return -6; size--; p++;