From c77f5c2515f697ab24c31761999660e4d888c343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Tue, 19 Jul 2005 14:21:28 +0000 Subject: [PATCH] (find_tag): find external references, we can't handle those, so tell user that instead of crashing git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15659 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/asn1/gen_decode.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/asn1/gen_decode.c b/lib/asn1/gen_decode.c index f94948063..7f64248cd 100644 --- a/lib/asn1/gen_decode.c +++ b/lib/asn1/gen_decode.c @@ -32,6 +32,7 @@ */ #include "gen_locl.h" +#include "lex.h" RCSID("$Id$"); @@ -160,6 +161,14 @@ find_tag (const Type *t, *tag = t->tag.tagvalue; break; case TType: + if ((t->symbol->stype == Stype && t->symbol->type == NULL) + || t->symbol->stype == SUndefined) { + error_message("%s is imported or still undefined, " + " can't generate tag checking data in CHOICE " + "without this information", + t->symbol->name); + exit(1); + } find_tag(t->symbol->type, cl, ty, tag); return; case TUTCTime: