From 05e39afb3fdbf76452a05c1c2a2c3164af9702ed Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 4 Sep 2019 13:27:45 -0700 Subject: [PATCH] Put the year field of the timestamp out in little-endian byte order. Change-Id: I9de300b05e8d66e71359241fddfe10d90f3f8d33 Reviewed-on: https://code.wireshark.org/review/34454 Petri-Dish: Guy Harris Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- wiretap/commview.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wiretap/commview.c b/wiretap/commview.c index 24a5e2fd63..ce5f68f42e 100644 --- a/wiretap/commview.c +++ b/wiretap/commview.c @@ -416,7 +416,7 @@ static gboolean commview_dump(wtap_dumper *wdh, tm = localtime(&rec->ts.secs); if (tm != NULL) { - cv_hdr.year = tm->tm_year + 1900; + cv_hdr.year = GUINT16_TO_LE(tm->tm_year + 1900); cv_hdr.month = tm->tm_mon + 1; cv_hdr.day = tm->tm_mday; cv_hdr.hours = tm->tm_hour; @@ -427,7 +427,7 @@ static gboolean commview_dump(wtap_dumper *wdh, /* * Second before the Epoch. */ - cv_hdr.year = 1969; + cv_hdr.year = GUINT16_TO_LE(1969); cv_hdr.month = 12; cv_hdr.day = 31; cv_hdr.hours = 23;