diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-04-26 07:34:12 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-04-26 07:34:12 +0000 |
commit | acc6970e276c9c62fb38bf37ea682b240a12082a (patch) | |
tree | 5abd448c576f351eeae8e1e64e12b4779abd09c8 /packet-per.c | |
parent | 35c1cb5c17b6284617d18596a95746fdb397f81b (diff) |
the the restricted character string has 0 characters in the encoding,
then we should NOT do any byte alignments.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10708 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-per.c')
-rw-r--r-- | packet-per.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packet-per.c b/packet-per.c index b27cc61174..20f74b2daf 100644 --- a/packet-per.c +++ b/packet-per.c @@ -7,7 +7,7 @@ proper helper routines * Routines for dissection of ASN.1 Aligned PER * 2003 Ronnie Sahlberg * - * $Id: packet-per.c,v 1.26 2004/03/25 23:58:06 guy Exp $ + * $Id: packet-per.c,v 1.27 2004/04/26 07:34:12 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -303,7 +303,6 @@ DEBUG_ENTRY("dissect_per_restricted_character_string"); } - /* xx.x if length is fixed or constrained to be less than or equal to two bytes, then it will not be byte aligned. */ byte_aligned=TRUE; @@ -313,6 +312,10 @@ DEBUG_ENTRY("dissect_per_restricted_character_string"); if(max_len<2){ byte_aligned=FALSE; } + if(!length){ + /* there is no string at all, so dont do any byte alignment */ + byte_aligned=FALSE; + } if(byte_aligned){ if(offset&0x07){ |