diff options
author | Pascal Quantin <pascal@wireshark.org> | 2019-10-23 11:26:14 +0200 |
---|---|---|
committer | Pascal Quantin <pascal@wireshark.org> | 2019-10-23 20:16:32 +0000 |
commit | eb4e83d5891165ca1f958cf57641200a8cb5a0b4 (patch) | |
tree | 8bc0397f99372e3447fda604946bf6dc6f7e6e77 /tools | |
parent | e50fd8b6088e3f5852802363e5abc792ea91d394 (diff) |
asn2wrs.py: fix parsing of integer unions with extension
When parsing the description
ExpectedActivityPeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...)
asn2wrs.py was generating some code where the has_extension flag was
wrongly set to false, leading to a decoding error.
Bug: 16145
Change-Id: I0d54994c0656f5b48f3dcd1864218c45a4ebc308
Reviewed-on: https://code.wireshark.org/review/34837
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/asn2wrs.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index 2be62b533c..dc6e0a953f 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -3548,7 +3548,7 @@ class Constraint (Node): if self.subtype[0].IsValue() and self.subtype[1].IsValue(): v0 = self.subtype[0].GetValue(ectx) v1 = self.subtype[1].GetValue(ectx) - (minv, maxv, ext) = (ectx.value_min(v0[0],v1[0]), ectx.value_max(v0[1],v1[1]), v0[2] or v1[2]) + (minv, maxv, ext) = (ectx.value_min(v0[0],v1[0]), ectx.value_max(v0[1],v1[1]), hasattr(self, 'ext') and self.ext) return (minv, maxv, ext) def IsAlphabet(self): |