[esnacc-dev] [PATCH 1/4] Fix crash when extension is used in child tags

stiffme at gmail.com stiffme at gmail.com
Mon Aug 22 02:10:16 UTC 2016


>From 64fc4024472ebb70e84e17b2b7419ce0da350173 Mon Sep 17 00:00:00 2001
From: stiffme <stiffme at gmail.com>
Date: Sun, 21 Aug 2016 18:55:07 +0800
Subject: [PATCH 1/4] Fix crash when extension is used in child tags

Extension type has no tags, this will cause :
tag = (Tag*)FIRST_LIST_ELMT (tl);
crash.
---
 compiler/back-ends/tag-util.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/back-ends/tag-util.c b/compiler/back-ends/tag-util.c
index fa2d2d7..3e7d30f 100644
--- a/compiler/back-ends/tag-util.c
+++ b/compiler/back-ends/tag-util.c
@@ -191,7 +191,9 @@ GetTags PARAMS ((t, stoleChoiceTags),

                 if (tl == NULL)
                     break;
-
+		if(e->type->basicType->choiceId == BASICTYPE_EXTENSION)
+			continue;
+			
 		          AsnListFirst (tl);
                 if (stoleChoicesAgain)
                 {

>From bbcf1b167f49309f97c31a56a5c3966237070bae Mon Sep 17 00:00:00 2001
From: stiffme <stiffme at gmail.com>
Date: Mon, 22 Aug 2016 09:52:51 +0800
Subject: [PATCH 2/4] Update AUTHORS

---
 AUTHORS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/AUTHORS b/AUTHORS
index f2796b2..a03aea1 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -32,7 +32,7 @@ Scott Rankin
 Tom Horvath
 Uri Blumenthal                        uri at mit.edu
 Vladislav Evgeniev
-
+Si Peng                               stiffme at gmail.com

 REPORTERS
 =========

>From b746b146d5b39074c2019b17770b60c05d0bcd81 Mon Sep 17 00:00:00 2001
From: stiffme <stiffme at gmail.com>
Date: Mon, 22 Aug 2016 09:59:39 +0800
Subject: [PATCH 3/4] Update tag-util.c

---
 compiler/back-ends/tag-util.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/compiler/back-ends/tag-util.c b/compiler/back-ends/tag-util.c
index 3e7d30f..0eba1e3 100644
--- a/compiler/back-ends/tag-util.c
+++ b/compiler/back-ends/tag-util.c
@@ -10,8 +10,11 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  *
- * $Header: /baseline/SNACC/compiler/back-ends/tag-util.c,v 1.7
2003/07/28 11:13:51 colestor Exp $
+ * $Header: /baseline/SNACC/compiler/back-ends/tag-util.c,v1.8
2016/08/22  Si Peng Exp $
  * $Log: tag-util.c,v $
+ * Revision 1.8  2016/08/22  Si Peng
+ * Fix a crash when implicit tags are used and child top level tag
contains "...".
+ *
  * Revision 1.7  2003/07/28 11:13:51  colestor
  * Changes to complete handing of the "--snacc namespace" compiler directive.
  * Also, updates to handle ASN.1 constant integer tag designations for C++/C.
@@ -85,7 +88,7 @@
  *   {                                          {
  *         foo [0] INTEGER,                          [0] INTEGER,
  *         bar SomeChoice,                           [1] BOOLEAN,
- *         bell [1] IMPLICIT BOOLEAN,                [2] IA5String
+ *         bell [1] IMPLICIT BOOLEAN,                [2] IA5String,
  *         gumby [2] SomeChoice,                }
            poki SomeOtherChoice
  *   }

>From 5b88652ba7942ca044469f873dae6a5ee90d19b6 Mon Sep 17 00:00:00 2001
From: stiffme <stiffme at gmail.com>
Date: Mon, 22 Aug 2016 10:01:45 +0800
Subject: [PATCH 4/4] Update tag-util.c

Added version information,
Changed example of implicit tags
---
 compiler/back-ends/tag-util.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/back-ends/tag-util.c b/compiler/back-ends/tag-util.c
index 0eba1e3..b7c4d0a 100644
--- a/compiler/back-ends/tag-util.c
+++ b/compiler/back-ends/tag-util.c
@@ -10,7 +10,7 @@
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  *
- * $Header: /baseline/SNACC/compiler/back-ends/tag-util.c,v1.8
2016/08/22  Si Peng Exp $
+ * $Header: /baseline/SNACC/compiler/back-ends/tag-util.c,v 1.8
2016/08/22  Si Peng Exp $
  * $Log: tag-util.c,v $
  * Revision 1.8  2016/08/22  Si Peng
  * Fix a crash when implicit tags are used and child top level tag
contains "...".
@@ -89,8 +89,8 @@
  *         foo [0] INTEGER,                          [0] INTEGER,
  *         bar SomeChoice,                           [1] BOOLEAN,
  *         bell [1] IMPLICIT BOOLEAN,                [2] IA5String,
- *         gumby [2] SomeChoice,                }
-           poki SomeOtherChoice
+ *	   gumby [2] SomeChoice,                     ...
+ *         poki SomeOtherChoice			}
  *   }
  *
  *  SomeOtherChoice ::= [APPLICATION 99] CHOICE { ....}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.esnacc.org/pipermail/dev/attachments/20160822/0e852942/attachment.html>


More information about the dev mailing list