diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-06-24 06:05:47 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-06-24 06:05:47 +0000 |
commit | 0caeb12499dc4d128b84f95e5b047b8f6b6e03e4 (patch) | |
tree | 7686561b1bbd742796bd8b8d682190cef025f9f9 /asn1.c | |
parent | 008dec8f04079375cdc15188ad6cfafc28f189a0 (diff) | |
download | wireshark-0caeb12499dc4d128b84f95e5b047b8f6b6e03e4.tar.gz wireshark-0caeb12499dc4d128b84f95e5b047b8f6b6e03e4.tar.bz2 wireshark-0caeb12499dc4d128b84f95e5b047b8f6b6e03e4.zip |
From Matthijs Melchior: when setting "eoc" in "asn1_bits_decode()", get
the offset from before the byte with the number of unused bits is
fetched, so that we count that byte.
svn path=/trunk/; revision=7920
Diffstat (limited to 'asn1.c')
-rw-r--r-- | asn1.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,7 +1,7 @@ /* asn1.c * Routines for ASN.1 BER dissection * - * $Id: asn1.c,v 1.19 2003/05/10 02:00:41 guy Exp $ + * $Id: asn1.c,v 1.20 2003/06/24 06:05:47 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -607,6 +607,7 @@ asn1_bits_decode ( ASN1_SCK *asn1, int enc_len, guchar **bits, int eoc; guchar *ptr; + eoc = asn1->offset + enc_len; *bits = NULL; ret = asn1_octet_decode (asn1, unused); if (ret != ASN1_ERR_NOERROR) @@ -634,7 +635,6 @@ asn1_bits_decode ( ASN1_SCK *asn1, int enc_len, guchar **bits, *bits = g_malloc (1); } - eoc = asn1->offset + enc_len; ptr = *bits; while (asn1->offset < eoc) { ret = asn1_octet_decode (asn1, (guchar *)ptr++); |