From 1dacbb936d32d0fc313535d511f7ccdefa0078dc Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 20 May 1998 12:25:35 +0000 Subject: [PATCH] Fixed bug that occurred in rare cases when encoding of incoming records failed. --- ir-tcl.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ir-tcl.c b/ir-tcl.c index ae10fcc..591914d 100644 --- a/ir-tcl.c +++ b/ir-tcl.c @@ -5,7 +5,11 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: ir-tcl.c,v $ - * Revision 1.105 1998-04-02 14:31:08 adam + * Revision 1.106 1998-05-20 12:25:35 adam + * Fixed bug that occurred in rare cases when encoding of incoming + * records failed. + * + * Revision 1.105 1998/04/02 14:31:08 adam * This version works with compiled ASN.1 code. * * Revision 1.104 1998/02/27 14:26:07 adam @@ -3591,7 +3595,8 @@ static void ir_handleDBRecord (IrTcl_Obj *p, IrTcl_RecordList *rl, { struct oident *ident; Z_ext_typeent *etype; - + + logf (LOG_DEBUG, "handleDBRecord size=%d", oe->u.octet_aligned->len); rl->u.dbrec.size = oe->u.octet_aligned->len; rl->u.dbrec.buf = NULL; @@ -3609,7 +3614,10 @@ static void ir_handleDBRecord (IrTcl_Obj *p, IrTcl_RecordList *rl, odr_setbuf (p->odr_in, (char*) oe->u.octet_aligned->buf, oe->u.octet_aligned->len, 0); if (!(*etype->fun)(p->odr_in, (char **) &rr, 0)) + { + rl->u.dbrec.type = VAL_NONE; return; + } switch (etype->what) { case Z_External_sutrs: -- 1.7.10.4