Wireshark-commits: [Wireshark-commits] rev 50274: /trunk/epan/dissectors/ /trunk/epan/dissectors/:
Date: Mon, 01 Jul 2013 01:56:23 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=50274

User: cmaynard
Date: 2013/06/30 06:56 PM

Log:
 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.

Directory: /trunk/epan/dissectors/
  Changes    Path                    Action
  +38 -46    packet-zbee-zcl-ha.c    Modified