Dealing with "1601-01-01T00:00:00Z" is unnecessarily awkward, especially
since the value only represents a 0 found in the data.
Signed-off-by: Alex Nelson <ajnelson@cs.ucsc.edu>
* fiwalk.cpp.
*
* The caller should free the returned buffer.
+ *
+ * This function returns NULL on a 0 input. In the context of
+ * hives, which only have mtimes, 0 will always be a complete
+ * absence of data.
*/
#define WINDOWS_TICK 10000000LL
time_t t;
struct tm *tm;
+ if (windows_ticks == 0LL)
+ return NULL;
+
t = windows_ticks / WINDOWS_TICK - SEC_TO_UNIX_EPOCH;
tm = gmtime (&t);
if (tm == NULL)