Commit Graph

36 Commits

Author SHA1 Message Date
Evan Huus 7124525d24 epan: remove a few more uses of wmem_packet_scope 2021-08-29 11:38:25 +00:00
João Valverde 9ba97d12d6 Add ws_debug() and use it
Replace most instances of ws_debug_printf() except in
epan/dissectors and dissector plugins.

Some replacements use printf(), some use ws_debug(), and
some were removed because they were dead or judged to be
temporary.
2021-05-24 01:13:19 +00:00
Guy Harris 138041b545 Squelch "Clarify calculation precedence" warning from cppcheck.
For

        A & B ? C : D

put "A & B" in parentheses, to clarify the precedence.
2021-01-19 23:12:03 -08:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Dario Lombardo deb81bd99f asn1: replace DISSECTOR_ASSERT_NOT_REACHED with DISSECTOR_ASSERT.
Change-Id: I5f7b870ada61c10397ecd6c1becf0087211252f7
Reviewed-on: https://code.wireshark.org/review/33734
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-06-25 11:37:23 +00:00
Dario Lombardo 45a3d0787f asn1: don't increment a buffer beyond its end.
Bug: 15870
Change-Id: I04cbb822f0e77c8e0ac8513e3a5c13116920ca6e
Reviewed-on: https://code.wireshark.org/review/33731
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-25 11:16:06 +00:00
Dario Lombardo 55c68ee69c epan: use SPDX indentifiers.
Skipping dissectors dir for now.

Change-Id: I717b66bfbc7cc81b83f8c2cbc011fcad643796aa
Reviewed-on: https://code.wireshark.org/review/25694
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-08 19:29:45 +00:00
Michael Mann 1da1f945e2 Fix checkAPI.pl warnings about printf
Many of the complaints from checkAPI.pl for use of printf are when its embedded
in an #ifdef and checkAPI isn't smart enough to figure that out.
The other (non-ifdef) use is dumping internal structures (which is a type of
debug functionality)
Add a "ws_debug_printf" macro for printf to pacify the warnings.

Change-Id: I63610e1adbbaf2feffb4ec9d4f817247d833f7fd
Reviewed-on: https://code.wireshark.org/review/16623
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-25 04:26:50 +00:00
Pascal Quantin 626c61c126 asn1.c: fix printf arguments used with DEBUG flag
Bug: 11581
Change-Id: If960e45d5ed71abb3cadcb6dd83832b9098e11a7
Reviewed-on: https://code.wireshark.org/review/10904
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-10-09 18:45:26 +00:00
Peter Wu 3f5d183a44 Stop using atof/strtod (fixes column sorting of float types)
atof is locale-dependent. In locales such as Swedish, German and Dutch,
the dot is a thousand separator, resulting in wrong conversions for
floats.

While at it, make the mate dissector also be independent of locale.
Blacklist atof in checkAPIs. Lemon is still using strtod, but that is
not our problem for now.

Bug: 11297
Bug: 8964
Change-Id: I6fe3e45eb1d6d95d41aa4f3af1f81a6204a60c63
Reviewed-on: https://code.wireshark.org/review/9116
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-25 15:38:45 +00:00
Guy Harris 233dc643a6 Remove some apparently-unnecessary includes of emem.h.
Change-Id: Id50ce3e707056cca8f30052f05c451ce431b39b5
Reviewed-on: https://code.wireshark.org/review/6632
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 19:36:36 +00:00
Michael Mann f5c4d06dba Replace some "low hanging fruit" uses of emem.
Most of the remaining ep_ uses are grouped with specific functionality.

Change-Id: I8fa64a17acc6bcdcf6891b2d28715ac0c58f1a4a
Reviewed-on: https://code.wireshark.org/review/6484
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-11 00:27:57 +00:00
Maarten Bezemer 08c0247b78 Support dissecting REAL (BER) data values
Both exponent and 'integer N' values are limited:
 * max exponent is 3 octets/24-bits
 * max integer N is 8 octets/64-bit

Tested with zero value/length, integers, doubles, positive and negative numbers all using the Basic Encoding Rules (BER)

Change-Id: If92e1b3e209c42909b8cb76e6f50b8e6cd1da0da
Reviewed-on: https://code.wireshark.org/review/5527
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-03 09:02:05 +00:00
Bill Meier 23e78cd6bd Add editor modelines; Adjust whitespace as needed.
Change-Id: I3dc57f4c2ca57585103e3b71503ac4c332903e50
Reviewed-on: https://code.wireshark.org/review/4594
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-10 14:50:08 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Jörg Mayer 029e258225 Explicitly include emem.h where it is needed
svn path=/trunk/; revision=51997
2013-09-13 08:16:50 +00:00
Bill Meier 0df5a9390d From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397

svn path=/trunk/; revision=48438
2013-03-20 01:18:10 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +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
Tomas Kukosa 7529f33437 support for additionally SIZE constrained Typereference
the support is only semiautomated as this feature does not occur very often
use this feature for the TBCD-STRING in the H.225 dissector

svn path=/trunk/; revision=23958
2007-12-28 10:42:44 +00:00
Tomas Kukosa c927edea31 ASN.1 parameterization handling (1st raw implementation)
it is not supported in asn2wrs now, code has to be written manually

svn path=/trunk/; revision=22724
2007-08-29 11:44:49 +00:00
Tomas Kukosa ab5d466fc7 rose_ctx_t structure usage in Q.932 dissector
svn path=/trunk/; revision=22349
2007-07-18 13:15:36 +00:00
Sebastien Tandel 21e897760f include string.h to import memcpy and memset functions signatures
svn path=/trunk/; revision=21812
2007-05-17 14:36:32 +00:00
Tomas Kukosa 61ffcf48a9 - more variants of dissect_per_open_type_*()
- move asn1_get_real() to asn1.c/.h

svn path=/trunk/; revision=21757
2007-05-14 13:39:31 +00:00
Tomas Kukosa 6632dd3a3b missing asn1.c file
svn path=/trunk/; revision=21678
2007-05-04 08:24:06 +00:00
Tomas Kukosa a68f0224c3 move asn1.c/.h files into plugins/asn1 directory as just this plugin uses it now
svn path=/trunk/; revision=20372
2007-01-10 07:09:30 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Ronnie Sahlberg 2a2039729a include emem.h
otherwise ep_strdup() defaults to int   which will break
if pointers are bigger than integers.


this should fix bugs 797  802  805 806


svn path=/trunk/; revision=17578
2006-03-11 11:18:56 +00:00
Luis Ontanon 95b2d64a36 ep_strdup stack buffer before returning it.
fixes coverity error 109.


svn path=/trunk/; revision=17489
2006-03-07 05:24:02 +00:00
Gerald Combs 5cb2a5e162 Fix a couple of errors found by valgrind.
svn path=/trunk/; revision=15900
2005-09-20 17:24:23 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Gerald Combs b992c73391 In packet-frame.c, don't free static memory when we throw a
DissectorError.  In packet-kerberos.c, restore pinfo->private_data if
we throw an exception, which keeps the SMB dissector from throwing
a DissectorError.  Initialize variables in other places to squelch
valgrind warnings.

svn path=/trunk/; revision=15235
2005-08-06 03:43:42 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Lars Roland ec9ca01616 Move the following files from /trunk to /trunk/epan:
asn1.[ch]
follow.[ch]
ptvcursor.[ch]
reassemble.[ch]
xmlstub.[ch]

fix #include statements accordingly.

svn path=/trunk/; revision=13366
2005-02-09 23:38:00 +00:00