From Matthias Benesch via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8869 :

This patch adds dissection of the following VNC extensions:
 - MirrorLink messages (http://mirrorlink.com/)
 - Context Information pseudo encoding (http://mirrorlink.com/)
 - Scan Line based Run-Length encoding (http://mirrorlink.com/)
 - LibVNCServer additions (http://libvncserver.sourceforge.net/)
 - H.264 encoding

From me: fix encoding arguments.

svn path=/trunk/; revision=50263
Fix up a mixup of the declaration of hf_vnc_auth_error_length and
hf_vnc_auth_error.

svn path=/trunk/; revision=50264
Add a cast to squelch a warning.

svn path=/trunk/; revision=50267
Actually initialize the localhost ethernet address before setting
dl_src/dl_dst to it.

Fixes uninitialized-read warnings from Valgrind on the capture in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8827

svn path=/trunk/; revision=50268
From Cal Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8876 :

Errors in preferences preceding "gui.console_open" are not immediately
displayed in the console:  If a gui.console_open is set to "AUTOMATIC" or
"ALWAYS" and an error or warning occurs in a preference previous to it, the
warning is not displayed in the console window because the window is not yet
open. However, if the user switches to another profile and returns, the
messages will be displayed.

Fix: Move the gui.console_open to the top of the list in
prefs_register_modules() of prefs.c. Existing preferences files can be
corrected by saving them.

svn path=/trunk/; revision=50269
Batch of filterable expert infos.

Also added a note about deprecating expert_add_info_format

svn path=/trunk/; revision=50270
Declare slist[] as static (reduces storage & code executed: *See below);
Declare dlist[] similarly to slist[] (not really needed since generated storage/code was OK as is)

*On Windows the following program generates sub-optimal code
 (when built using VC10 or VC11 with CFLAGS as used when building Wireshark).

void foo(void) {
    const char *const zz[] = {"ABC", "abc"};
}
-------------

Code generated:

<snip>
_DATA	SEGMENT
$SG1013	DB	'ABC', 00H  !!! note string stored twice !!
$SG1014	DB	'ABC', 00H
$SG1015	DB	'abc', 00H
$SG1016	DB	'abc', 00H
_DATA	ENDS

<snip>
; 1    : void foo(void) {

	push	ebp
	mov	ebp, esp
	sub	esp, 8

; 2    :     const char *const zz[] = {"ABC", "abc"};

	mov	DWORD PTR _zz$[ebp], OFFSET $SG1014    !! note: each ptr of array
	mov	DWORD PTR _zz$[ebp+4], OFFSET $SG1016  !!  individually pushed on stack

<snip>

Not shown: Declaring zz as 'static' generates much better code....


svn path=/trunk/; revision=50271
From David Richards via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8871 :

TLS decryption fails when trying to decrypt XMPP sessions using start_tls as
the port in the key list of the SSL preferences.

Looking at the code, the XMPP dissector has 2 issues:

1) The crude XML element detection for XMPP segmentation is run before
checking if the SSL dissector should be called.  As a result, the SSL dissector
is not called at the appropriate times.

2) The SSL dissector is called withoug resetting the desegment flags are not
manipulated as the SMTP dissector does so segmented SSL packets are not properly
reconstructed.  Generally this causes the server hello not to be detected.

A proposed patch to fix these issues is attached.

svn path=/trunk/; revision=50272
ANother iteration,
- started harvesting pieces from tshark.
- fixed? signal handlers
- interactive test program

very hard to debug... set follow-on-fork doesn't seem to work on my mac. Need linux I guess...


svn path=/trunk/; revision=50273
Fix Coverity CID 1040370 (Explicit null dereferenced) by removing the if (tree) { ... } tests so that payload_tree is always assigned regardless of whether tree is NULL or not.

Fix Coverity CID 1040371 (Negative loop bound) by not assignin the return value of tvb_length_remaining() to an unsigned integer and then using that value for loop termination.  Instead, assign the return value to a signed integer and only if tvb_length_remaining() returns a value greater than zero do we even begin to loop.

In addition, use tvb_length_remaining() instead of tvb_length() to determine if more data exists, and then if it does, when displaying the payload bytes following the cmd_id, only pass the number of remaining bytes following the cmd_id rather than the entire length, which would include the 1 byte for the cmd_id itself.

Other minor changes.

svn path=/trunk/; revision=50274
Fix Coverity CID 280550 (Dereference null return value) by checking that ieee_hints is not NULL before dereferencing it (as is done in all other cases).

svn path=/trunk/; revision=50275
Use tvb_reported_length_remaining() instead of tvb_length_remaining().

svn path=/trunk/; revision=50276
Consistently maintain the callState member of an iax2_info_t structure
as a voip_call_state value; don't have it sometimes a voip_call_state
and sometimes a frame subtype.

This should squelch some complaints from newer versions of Clang about
unnecessary array-bounds checks - the array-bounds checks are done on
frame subtypes, where they *are* necessary (nothing prevents an
untrustworthy IAX2 implementation or an untrustworthy capture file
writer from putting an arbitrary value in the packets), not on
voip_call_state values (where it was only necessary because the value
wasn't, in that case, a voip_call_state value, it was a frame subtype
cast to a voip_call_state).

svn path=/trunk/; revision=50277
Realized that Coverity would have still complained about "explicit null dereferences", so add in some additional checks.

svn path=/trunk/; revision=50278
A better fix than r50278.

svn path=/trunk/; revision=50279
Fix Coverity CID's 1037112, 1037113 and 1040635 (Explicit null dereferenced).

svn path=/trunk/; revision=50280
Fix Coverity CID 1040636 (Out-of-bounds read) by changing the loop termination condition from "i < ZBEE_ZCL_NUM_ATTR_ETT" to "i < ZBEE_ZCL_APPL_CTRL_NUM_FUNC_ETT".  The former is defined as 64 while the latter is defined as 32 and ett_zbee_zcl_appl_ctrl_func[], which is indexed within the loop, has only 32 entries.

svn path=/trunk/; revision=50281
There are a few dissectors that pass the return value of tvb_length_remaining() as the size argument to the tvb_format_*() functions.  Try to do something sane if that value happens to be -1 (or negative in general).  One such example is packet-bthfp.c, as found and reported by Coverity in CID 1035325 (Improper use of negative value).

Note: There are other ways to handle this of course, but this fix is suitable for backporting to both 1.10 and 1.8, as it does not break binary compatibility.  Is there a better way to fix this though?  For now, schedule this for backport.

svn path=/trunk/; revision=50282
Fix Coverity CID 1040372 (Printf arg count mismatch) by eliminating the double %'s.

svn path=/trunk/; revision=50283
Return from dissect_at_command() immediately if tvb_length_remaining() returns -1.

svn path=/trunk/; revision=50284