Commit graph

40922 commits

Author SHA1 Message Date
Anders Broman
4312a9dd61 Remove C++ style comments initilize some variables.
svn path=/trunk/; revision=42884
2012-05-28 16:00:20 +00:00
Jakub Zawadzki
5020a3f170 While iterating over string characters don't use strlen(), but check for NUL.
svn path=/trunk/; revision=42883
2012-05-28 15:59:00 +00:00
Anders Broman
bb08a70594 Set SVN properties.
svn path=/trunk/; revision=42882
2012-05-28 15:30:09 +00:00
Anders Broman
136ad63adf Set SVN properties.
svn path=/trunk/; revision=42881
2012-05-28 15:29:36 +00:00
Anders Broman
14eb5154ac From Erwin Rol:
Artnet, RDM and DMX dissector updates

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7286

svn path=/trunk/; revision=42880
2012-05-28 15:24:54 +00:00
Anders Broman
55261641d9 Extend the switch statement.
svn path=/trunk/; revision=42879
2012-05-28 15:09:33 +00:00
Anders Broman
d52a12c60e Move defenition of rlc_mode.
svn path=/trunk/; revision=42878
2012-05-28 14:50:54 +00:00
Anders Broman
2a412f000b Try to pacify the Ubuntu buildbot.
svn path=/trunk/; revision=42877
2012-05-28 13:53:33 +00:00
Anders Broman
d8ddd39c3d Enhance CHANNEL_HSDSCH dissection.
svn path=/trunk/; revision=42876
2012-05-28 13:38:40 +00:00
Ronnie Sahlberg
4baba1c684 Sometimes you might have plaintext LDAP for a SASL LDAP connection if the handshake never occured.
Observed with exchange in some configurations.

From Matthieu Patou <mat@matws.net>


svn path=/trunk/; revision=42875
2012-05-28 09:40:54 +00:00
Guy Harris
ee57847596 That doesn't work correctly if we read in a file with no interface
information, as it'll fill in whatever stuff happens to be in the
capture info.  We should somehow figure uot whether this is a capture we
just did (note: cf->is_tempfile does *NOT* necessarily tell us that, as
it's set for the result of a merge, and is cleared if we save the
capture) and fill in the interface information only if that's the case.

Put in a comment to note that we need to do that.

svn path=/trunk/; revision=42874
2012-05-28 01:23:28 +00:00
Guy Harris
88fb10b8a3 Correctly implement what was my intent when removing the HAVE_LIBPCAP
stuff - arrange that the interface summary list is set, if we've read a
capture file that has interface information, *regardless* of whether we
have libpcap/WinPcap or not.

That means that summary_fill_in() should fill in the interface
information for the summary if there's interface information from the
capture file, and summary_fill_in_capture() - which is called only if
HAVE_LIBPCAP is defined, and can exist only if HAVE_LIBPCAP is defined
(as it takes an argument of a type that's defined only if HAVE_LIBPCAP
is defined) - just fills in interface information from the capture
options and does so only if there's none from the file.

svn path=/trunk/; revision=42873
2012-05-28 01:17:48 +00:00
Guy Harris
e954e00926 Interface lists currently have to be constructed in the open routine
(otherwise, nobody sees them); do so.

Fix some cases where we weren't doing the proper post-processing after
doing the heuristics for format changes that didn't involve magic-number
changes (discovered because constructing the interface list is now being
done as part of that post-processing).

Fixes bug 7287.

svn path=/trunk/; revision=42872
2012-05-28 00:43:13 +00:00
Guy Harris
53375198ec Don't use pcap LINKTYPE_ values in the iface_options structure, use
Wiretap encapsulation values; rename the field in question encap_type to
emphasize that.  (Code that looks at that field already assumes it's a
Wiretap encapsulation value.)

For live captures, map the LINKTYPE_ value to a Wiretap encapsulation
value.

wtap_encap_string() never returns NULL, so don't check for a null return
value.

svn path=/trunk/; revision=42871
2012-05-28 00:31:27 +00:00
Guy Harris
fb68fa844c Clean up indentation (use spaces, not tabs).
svn path=/trunk/; revision=42870
2012-05-27 23:50:14 +00:00
Guy Harris
a66097145d Clean up indentation (remove tabs from one structure definition).
svn path=/trunk/; revision=42869
2012-05-27 23:41:03 +00:00
Guy Harris
bd7c59b254 Clean up indentation (use spaces, not tabs).
svn path=/trunk/; revision=42868
2012-05-27 23:32:12 +00:00
Guy Harris
e6ec5d8f50 From Evan Huus in bug 7295:
cppcheck realized that if_info is known not to be null in that code
path, and therefore that checking whether it's null in that code path is
unnecessary.  Remove it.

svn path=/trunk/; revision=42867
2012-05-27 20:47:57 +00:00
Guy Harris
d7279caa93 From Evan Huus from bug 7295:
Fix an ancient copy-and-pasteo of mine ("me" here meaning Guy Harris,
not Evan Huus) - remove an unused data structure (used in the code I
copied and pasted to make this code, not used here).

svn path=/trunk/; revision=42866
2012-05-27 20:45:16 +00:00
Guy Harris
bd5060b836 vwr_read_rec_header()'s return value is used only to distinguish success
(read a record header) from failure (got an EOF or an error).  Make it
just return a Boolean.

If it fails in vwr_read(), don't overwrite *err_info (yes,
vwr_read_rec_header() might have set *err_info, so don't lose - and
leak! - the value it returned) - trust vwr_read_rec_header(), or the
routines it calls, to have set it.  (If there's a code path where that
doesn't happen, that code path needs to be fixed; the setting of
*err_info in vwr_read() should *not* be restored.)

Thanks to Evan Huus for finding a useless variable with cppcheck, and
reporting it in bug 7295, provoking me to look at this.

svn path=/trunk/; revision=42865
2012-05-27 20:40:09 +00:00
Gerald Combs
7e5bc5d6ca [Automatic manuf, services and enterprise-numbers update for 2012-05-27]
svn path=/trunk/; revision=42862
2012-05-27 14:03:33 +00:00
Jörg Mayer
2d935ea939 - Update cmake, gnutls and pixman to current version
- unpack an xz file with xzcat instead of gzcat
- remove some trailing whitespace
- the update of gnutls required two changes in the gnutls
  build stuff: a) gnutls.pc is now generated from gnutls.pc.in
  and b) we now need to build with --without-p11-kit

svn path=/trunk/; revision=42861
2012-05-27 10:15:56 +00:00
Guy Harris
73fbd6894d I already got rid of that variable - it just mirrors cf->filename.
svn path=/trunk/; revision=42860
2012-05-26 00:53:50 +00:00
Guy Harris
3d3b154b12 We can't save a live capture file with a ws_rename() on Windows, as we
have the file open.  Go back to doing it with a copy on Windows.

Explain what the problem is, and give a way in which we might be able to
make it work on Windows (without using any NT native API calls...).

svn path=/trunk/; revision=42859
2012-05-26 00:44:49 +00:00
Guy Harris
92f38021bf See if this fixes the include problem.
svn path=/trunk/; revision=42857
2012-05-25 21:58:10 +00:00
Guy Harris
3ccf517f37 Fix some build problems.
svn path=/trunk/; revision=42856
2012-05-25 21:52:50 +00:00
Guy Harris
6014035703 Use GTK+'s GtkMessageDialog for the questions we ask in the process of
saving files, and run it modal (which we're already doing with the
GtkFileChooserDialog); this means less callback-based state machine
stuff, simplifying the code paths a bit.

If we're saving a file before closing it, don't bother reloading it
after saving it.

svn path=/trunk/; revision=42855
2012-05-25 21:25:55 +00:00
Guy Harris
ce9bd39893 On a read error, always return a pointer to the merge_in_file_t for the
file from which we got the error.

On a successful read, always clear out err - wtap_read() doesn't set *err
on success.

svn path=/trunk/; revision=42854
2012-05-25 18:50:47 +00:00
Gerald Combs
3e24d3bbce Add a null check to fix Coverity CID 280210. It doesn't look like we'd
run into this in the wild.

svn path=/trunk/; revision=42853
2012-05-25 18:25:31 +00:00
Guy Harris
cc4f738fc0 Well, "ui/gtk/capture_file_dlg.h" is needed on Win32.
svn path=/trunk/; revision=42851
2012-05-25 09:58:42 +00:00
Guy Harris
c48b78bbee ui/gtk/capture_file_dlg.h doesn't need to be included in these files.
svn path=/trunk/; revision=42850
2012-05-25 09:26:45 +00:00
Chris Maynard
cd7c8f671b Fix Coverity CID 700177 Unused pointer value.
svn path=/trunk/; revision=42849
2012-05-25 02:51:23 +00:00
Chris Maynard
22415dc211 The rest of the fix for Coverity CID's 280507 and 280508. (There were multiple occurrences grouped into the 2 CID's, but I hadn't noticed them all.)
svn path=/trunk/; revision=42848
2012-05-25 02:43:39 +00:00
Chris Maynard
c0b55e486a tvb_length_remaining() can return a negative number, so be sure to handle it. Fixes Coverity CID's 280507 and 280508.
svn path=/trunk/; revision=42847
2012-05-25 02:18:49 +00:00
Chris Maynard
b2f2e1a675 In ns_hrtime2nsec(), cast "val" to guint64 to fix Coverity CID 702389 Unintentional integer overflow.
svn path=/trunk/; revision=42846
2012-05-25 02:04:29 +00:00
Chris Maynard
973b45c401 Add a "fallthrough" comment to avoid a missing break report from Coverity. Fixes Coverity CID 702382 Missing break in switch.
svn path=/trunk/; revision=42845
2012-05-25 01:49:49 +00:00
Chris Maynard
6272bd1578 In cap_pipe_open_live(), be sure to call ws_close(fd) before returning due to a couple of error condtions. Fixes Coverity CID 702395 Resource leak.
svn path=/trunk/; revision=42844
2012-05-25 01:32:26 +00:00
Chris Maynard
814682d0d8 Fix Coverity CID 701035: Dereference after null check of hfinfo.
svn path=/trunk/; revision=42843
2012-05-25 01:14:29 +00:00
Chris Maynard
3445d93bf2 Fix Coverity CID 700201: Dereference after null check, by ensuring "decoder" is not NULL before passing it to ssl_decrypt_record().
svn path=/trunk/; revision=42842
2012-05-25 00:54:49 +00:00
Chris Maynard
ada62f22a8 If either create_persconffile_dir() or ws_fopen() fail, then bail out. This avoids potentially dereferencing "daf" if it's NULL and fixes Coverity CID 281275.
svn path=/trunk/; revision=42841
2012-05-25 00:43:32 +00:00
Chris Maynard
8fd9342f7d tvb_length_remaining() can return a negative number, so be sure to handle it. Fixes Coverity CID 281367.
svn path=/trunk/; revision=42840
2012-05-25 00:29:46 +00:00
Chris Maynard
0c49176411 tvb_length_remaining() can return a negative number, so be sure to handle it. Fixes Coverity CID's 280233-280235.
svn path=/trunk/; revision=42839
2012-05-24 23:35:23 +00:00
Chris Maynard
b7e5cce721 Update asn1-generated dissector.
svn path=/trunk/; revision=42838
2012-05-24 23:31:38 +00:00
Chris Maynard
06606bb68f tvb_reported_length_remaining() can return a negative number. In dissect_gadu_gadu_userlist80_compressed(), bail out if it does. Fixes Coverity CID 703085. In dissect_gadu_gadu_stringz_cp1250(), be sure to compare against its return value as being only positve rather than non-zero. Also, fixed a couple of typos.
svn path=/trunk/; revision=42837
2012-05-24 23:14:30 +00:00
Jeff Morriss
135ebc4148 Don't include a Clear button in the packet- and capture-file-comment dialogs:
the user can just Ctrl-A + backspace if they want to do that.

svn path=/trunk/; revision=42836
2012-05-24 21:38:22 +00:00
Jeff Morriss
373e0925f3 Enable word wrapping for capture-file comments.
svn path=/trunk/; revision=42835
2012-05-24 21:35:41 +00:00
Jeff Morriss
9ea08d6b12 Get rid of the button row for the capture-file comments. Instead, turn the
whole summary dialog into an editor-like dialog with an OK and Cancel buttons
(OK sets the new capture file comment, Cancel doesn't).

In order to keep the dialog the same regardless of the file type (and avoid
having a Cancel and OK button when there's no text field to edit), allow
users to create or edit capture-file comments even if the file type is not
PCAPNG (they can add a comment via the add/edit comment UI anyway).

Don't include a Clear button: the user can just Ctrl-A + backspace if they
want to do that.

Don't set the comment text to "[None]" if there's no comment, just leave it
blank.

Don't allow the user to create more than 1 Summary dialog at a time.

svn path=/trunk/; revision=42834
2012-05-24 21:33:25 +00:00
Guy Harris
0d6e9145be Word-wrap comments in the display.
svn path=/trunk/; revision=42833
2012-05-24 19:18:31 +00:00
Jeff Morriss
a4bbd97979 Use cf_update_capture_comment() to save the capture comment (instead of
summary_update_comment() which is no longer necessary).
cf_update_capture_comment() has the advantage that it doesn't mark the file
as unsaved unless the comment actually changed.

svn path=/trunk/; revision=42832
2012-05-24 18:59:39 +00:00
Jeff Morriss
474281be2a Free the new comment after calling gtk_text_buffer_set_text().
svn path=/trunk/; revision=42831
2012-05-24 18:55:38 +00:00