Wireshark-commits: [Wireshark-commits] master 10ca4c7: More checks for localtime() and gmtime() ret

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Sat, 22 Oct 2016 02:27:54 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=10ca4c7527122efde0300205deaa6c0143f07219
Submitter: Guy Harris (guy@xxxxxxxxxxxx)
Changed: branch: master
Repository: wireshark

Commits:

10ca4c7 by Guy Harris (guy@xxxxxxxxxxxx):

    More checks for localtime() and gmtime() returning NULL.
    
    And some comments in the case where we're converting the result of
    time() - if your machine's idea of time predates January 1, 1970,
    00:00:00 UTC, it'll crash on Windows, but that's not a case where a
    *file* can cause the problem due either to a bad file time stamp or bad
    time stamps in the file.
    
    Change-Id: I837a438e4b875dd8c4f3ec2137df7a16ee4e9498
    Reviewed-on: https://code.wireshark.org/review/18369
    Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
    

Actions performed:

    from  49cf42c   localtime() can return NULL, even if it's unlikely.
    adds  10ca4c7   More checks for localtime() and gmtime() returning NULL.


Summary of changes:
 dumpcap.c                     |   21 +++++----
 epan/print.c                  |   21 +++++++--
 epan/tvbuff.c                 |   13 ++++--
 extcap.c                      |    4 ++
 ringbuffer.c                  |    6 +++
 text2pcap.c                   |    1 +
 ui/cli/tap-iostat.c           |   86 +++++++++++++++++++++--------------
 ui/cli/tap-iousers.c          |  100 +++++++++++++++++++++++------------------
 ui/console.c                  |   15 ++++---
 ui/gtk/fileset_dlg.c          |   20 ++++++---
 ui/gtk/iax2_analysis.c        |   23 ++++++----
 ui/gtk/io_stat.c              |   21 +++++----
 ui/gtk/main_welcome.c         |    2 +-
 ui/gtk/memory_dlg.c           |   21 +++++----
 ui/gtk/rtp_analysis.c         |   22 +++++----
 ui/gtk/rtp_player.c           |   10 ++++-
 ui/text_import.c              |    1 +
 wiretap/commview.c            |   27 ++++++++---
 wiretap/logcat_text.c         |   43 +++++++++++++-----
 wiretap/network_instruments.c |    1 +
 wsutil/tempfile.c             |    1 +
 21 files changed, 299 insertions(+), 160 deletions(-)