Anders Broman
cab0dc1340
Don't treat the aligned and unaligned bit strings differently
...
always padd LSBs.
Hopfully this does not break anything else...
svn path=/trunk/; revision=35680
2011-01-27 15:48:02 +00:00
Anders Broman
66053b7b3a
From Johannes Lange:
...
Function dissect_per_bit_string_display might read more bytes than available (PER dissector).
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5394
svn path=/trunk/; revision=35023
2010-11-24 16:35:23 +00:00
Anders Broman
4d4283ef98
From Johannes Lange:
...
Bug 5393 - Wrong length calculation in new_octet_aligned_subset_bits() (PER dissector) .
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5393
svn path=/trunk/; revision=35021
2010-11-24 16:21:04 +00:00
Stig Bjørlykke
2b37214674
From Pascal Quantin via bug 5301:
...
Make the PER constaints check like in the BER dissector.
svn path=/trunk/; revision=34536
2010-10-17 14:07:05 +00:00
Stig Bjørlykke
38ba5119cd
From Pascal Quantin via bug 5301:
...
Add expert info when ASN.1 PER constrained integer does not match range.
svn path=/trunk/; revision=34531
2010-10-17 11:59:10 +00:00
Tomas Kukosa
a974e115ce
Fix start offset and length handling in SEQUNCE OF (caused Gtk crash for sequences at the end of frame)
...
svn path=/trunk/; revision=34058
2010-09-03 10:31:56 +00:00
Stig Bjørlykke
026f4dfa7b
Fixed guint64 printf modifier.
...
svn path=/trunk/; revision=33799
2010-08-14 17:22:22 +00:00
Anders Broman
856f205c27
Fix up decoding of bitfields in the aligned variant.
...
svn path=/trunk/; revision=33798
2010-08-14 16:42:41 +00:00
Anders Broman
91e949512d
From Neil Piercy:
...
Fix misleading PER Bit string display.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4789
(I Added bits display)
svn path=/trunk/; revision=32948
2010-05-25 19:29:23 +00:00
Bill Meier
09764dd969
Remove unneeded #include <stdio.h>
...
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Bill Meier
9b568ea691
Fix gcc -Wshadow warnings
...
svn path=/trunk/; revision=31561
2010-01-19 00:37:39 +00:00
Gerasimos Dimitriadis
2e138172a2
Constrained SEQ OF in PER encoding associated with wrong length;
...
also take into account cases of length 0.
svn path=/trunk/; revision=31219
2009-12-09 21:18:04 +00:00
Guy Harris
3bb1cd12a4
No non-ASCII characters, please.
...
svn path=/trunk/; revision=31049
2009-11-22 21:54:50 +00:00
Anders Broman
98c852386d
Handle lenght restriction extension of restricted strings.
...
Fixes
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4251
svn path=/trunk/; revision=31047
2009-11-22 17:00:45 +00:00
Anders Broman
9aa6257dde
Handle extended PER bitstrings.
...
svn path=/trunk/; revision=31034
2009-11-20 21:40:28 +00:00
Stig Bjørlykke
c60a5b284e
Added offset fix from bug 4202, error introduced in r30770.
...
svn path=/trunk/; revision=30815
2009-11-04 11:41:05 +00:00
Guy Harris
c9b5bc30d0
assert() doesn't throw an exception, it just immediately crashes the
...
app, and DISSECTOR_ASSERT() throws an exception, but claims the problem
is a dissector bug, not a malformed packet. Presumably the error in
question is the result of a malformed packet, so throw
ReportedBoundsError to indicate that (it's not really the *right*
exception, but the right exception doesn't exist).
svn path=/trunk/; revision=30776
2009-10-31 08:31:21 +00:00
Anders Broman
d3b7b182c1
- In new_octet_aligned_subset_bits() the length check must be on octet not bits.
...
- try to make the code a bit more readable.
svn path=/trunk/; revision=30770
2009-10-30 16:09:32 +00:00
Anders Broman
88bb44a51e
From Jakub Zawadzki:
...
Cleanup dissector code - use proper memory functions.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164
svn path=/trunk/; revision=30691
2009-10-25 11:43:30 +00:00
Jeff Morriss
46fc4eea81
new_octet_aligned_subset_bits(): call tvb_ensure_bytes_exist() before
...
attmepting to malloc memory to ensure we've been asked to decode a reasonable
number of bits (and thus are asking for a reasonable number of bytes from
malloc()).
That should fix the fuzz failure in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4138
Add a comment to new_octet_aligned_subset() asking why we're resetting the
length to tvb_length()--that means we'll never throw an exception.
svn path=/trunk/; revision=30611
2009-10-18 23:19:44 +00:00
Stig Bjørlykke
fd2662b27f
Added a check for num_opts to avoid a theoretical undefined behavior.
...
svn path=/trunk/; revision=30537
2009-10-12 14:43:09 +00:00
Anders Broman
bc9a809b65
From Didier Gautheron:
...
ep memory can't be used for tvbs defined as data_source.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4054
svn path=/trunk/; revision=30376
2009-10-06 19:15:58 +00:00
Anders Broman
af3ad92c81
From Sean Yunjnz:
...
Problem in packet-per.c for ASN.1 PER Encoding.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3733
svn path=/trunk/; revision=29124
2009-07-16 21:09:18 +00:00
Stig Bjørlykke
b228488bc0
From Kovarththanan Rajaratnam via bug 3548:
...
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Anders Broman
ea4f4f08af
Froim Vincent Helfre:
...
Fix issues with unaligned PER.
svn path=/trunk/; revision=28374
2009-05-15 18:39:33 +00:00
Anders Broman
c91a384702
Apply some of the patches from:
...
http://wiki.wireshark.org/Development/Optimization
svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Anders Broman
6f74922803
From Vincent Helfre and Me:
...
- Dissect GSM messages.
- Add functions to libwireshark needed by plugins.
svn path=/trunk/; revision=28068
2009-04-16 19:01:31 +00:00
Tomas Kukosa
b555f92211
do not report encoding error for sequence extension with length 0
...
highlight one byte also for NULL type
svn path=/trunk/; revision=28043
2009-04-14 07:38:02 +00:00
Anders Broman
b1b5873c48
Handle PER constrained integer > 32 bits, show more internal PER fields.
...
svn path=/trunk/; revision=28026
2009-04-10 09:24:10 +00:00
Anders Broman
daf059d5ed
Remove #if 0
...
svn path=/trunk/; revision=27931
2009-04-02 17:04:04 +00:00
Anders Broman
19de9df296
From Vincent Helfre:
...
Fix unaligned bitfields.
svn path=/trunk/; revision=27907
2009-03-31 05:44:48 +00:00
Anders Broman
98d0847eda
From Vincent Helfre:
...
Fix unaligned bitfields.
From me activate the SEQUENCE OF patch.
svn path=/trunk/; revision=27853
2009-03-26 18:01:26 +00:00
Anders Broman
99bbe55222
Make it possible to check for extension marker in SEQUENCE OF and SET OF.
...
Fore some reason the trace in bug https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3360 does not decode properly
if dissecting the exension marker so leave that code #if 0:ed out for now.
svn path=/trunk/; revision=27848
2009-03-25 22:04:23 +00:00
Stig Bjørlykke
1c9cbffcdf
From Neil Piercy (bug 3299):
...
Added support for length greater than 127 (less than 16K).
svn path=/trunk/; revision=27603
2009-03-03 22:46:47 +00:00
Bill Meier
c0e92cbc04
Fix various typos and spelling errors (mostly in text strings)
...
svn path=/trunk/; revision=27065
2008-12-20 00:09:02 +00:00
Stig Bjørlykke
76ba68775b
Do not call a variable value_string as we have a struct with this name.
...
svn path=/trunk/; revision=26658
2008-10-31 18:42:53 +00:00
Stig Bjørlykke
e6a22e689e
Fix some "format not a string literal and no format arguments" warnings.
...
svn path=/trunk/; revision=26648
2008-10-31 15:34:00 +00:00
Tomas Kukosa
1644e4138a
Get rid of few warnings (unused generated code, signed/unsigned mismatch)
...
svn path=/trunk/; revision=25839
2008-07-26 15:28:04 +00:00
Anders Broman
db62900421
Add an expert item warning if a full sequence isn't decoded. ( take 2)
...
svn path=/trunk/; revision=25486
2008-06-19 14:19:13 +00:00
Stig Bjørlykke
db455a9899
Initialize new_offset.
...
svn path=/trunk/; revision=25485
2008-06-19 12:36:30 +00:00
Anders Broman
a4614ab3ef
Add an expert item warning if a full sequence isn't decoded.
...
svn path=/trunk/; revision=25484
2008-06-19 12:16:26 +00:00
Stig Bjørlykke
772b24c149
Fix the crash from bug 2432. I don't really like that we use a new tvb
...
and a new data source for displaying unaligned octet strings, because the
user cannot easily see where in the data package the values are from.
Maybe we should implement a "Packet Bits" pane for bit protocols?
Or just an option to turn the Bytes pane to a Bits pane?
Another problem is that the generated pdml (from the bug report) does not
generate correct data for these fields, as the "pos" value is always zero
(because we use a new tvb with offset 0). But I suppose it's difficult to
fix this with byte values...
svn path=/trunk/; revision=24992
2008-04-13 16:42:41 +00:00
Anders Broman
052b1a488f
Return value tvb if pressent from all branches.
...
svn path=/trunk/; revision=24698
2008-03-19 19:10:31 +00:00
Tomas Kukosa
df1763c49b
fix from Anders: offset->boffset
...
svn path=/trunk/; revision=24697
2008-03-19 09:14:47 +00:00
Anders Broman
8ad1d17b61
Handle the case where length is > remaining tvb
...
trace in:
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1809
svn path=/trunk/; revision=24691
2008-03-18 20:10:50 +00:00
Stig Bjørlykke
b091b8d26c
Rewrote to use g_strlcpy and g_strlcat.
...
svn path=/trunk/; revision=24525
2008-03-01 17:23:39 +00:00
Guy Harris
fb32ed8812
Get rid of non-ASCII characters.
...
svn path=/trunk/; revision=24171
2008-01-23 20:15:13 +00:00
Stig Bjørlykke
01b304a6b7
Moved a G_GINT64_CONSTANT to a more correct position.
...
svn path=/trunk/; revision=24108
2008-01-15 23:25:40 +00:00
Anders Broman
5bbef7d0c0
Use G_GINT64_CONSTANT(hope it makes the OS X build bot happy).
...
Unused variables fix to camel.
svn path=/trunk/; revision=24106
2008-01-15 22:23:57 +00:00
Anders Broman
7e572a34c0
Use G_GINT64_CONSTANT(hope it makes the build bot happy).
...
svn path=/trunk/; revision=24105
2008-01-15 22:07:29 +00:00