Wireshark mailing list archives

Re: localtime_r() in gtk/timeshift_dlg.c


From: Stig Bjørlykke <stig () bjorlykke org>
Date: Tue, 16 Aug 2011 19:52:14 +0200

On Tue, Aug 16, 2011 at 12:17 AM, Gisle Vanem <gisle.vanem () gmail com> wrote:
This:
 #ifdef _MSC_VER
 #define localtime_r(a, b) memcpy((b), localtime((a)), sizeof(struct tm));
 #endif

doesn't look so safe. We should maybe use the localtime_r() in
wsutil/strptime.c?

Or simply just use localtime, check the return value and then copy the values.
Like in revision 38569.


-- 
Stig Bjørlykke
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: