Wireshark-commits: [Wireshark-commits] master 9230834: Don't copy zero bytes of data.
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 14 Jul 2015 18:36:56 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=9230834fbe06f893bd581ab889b94122df5a9998
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

9230834 by Guy Harris (guy@xxxxxxxxxxxx):

    Don't copy zero bytes of data.
    
    memcpy(NULL, NULL, 0) isn't guaranteed by ISO C90 to work, so don't do
    it.  Check whether the length is zero, and don't copy if it is.  (If the
    count is non-zero and the pointer is null, that's an error, and we
    should fail there, so base the test on the length, not the pointer.)
    
    Change-Id: I0b3dc1541b52670d8fef459754c9494cfcc59e5d
    Reviewed-on: https://code.wireshark.org/review/9633
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  cdeae7e   Add a "heuristic dissectors" tab to the Enable Protocols dialog.
    adds  9230834   Don't copy zero bytes of data.


Summary of changes:
 epan/address.h |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)