1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
Description: Fix Prelude timegm comparaison
Author: Thomas Andrejak <thomas.andrejak@gmail.com>
Last-Update: 2017-02-28
Forwarded: https://www.prelude-siem.org/issues/865
--- libprelude-3.1.0/src/idmef-criterion-value.c 2016-12-04 22:36:21.364349964 +0100
+++ libprelude-3.1.0/src/idmef-criterion-value.c 2016-12-04 22:37:40.770573582 +0100
@@ -194,22 +194,22 @@
/*
* Apply mask
*/
- if ( comp.tm_sec < 0 ) lt.tm_sec = -1;
+ if ( comp.tm_sec < 0 ) comp.tm_sec = lt.tm_sec;
else need_full_compare = TRUE;
- if ( comp.tm_min < 0 ) lt.tm_min = -1;
+ if ( comp.tm_min < 0 ) comp.tm_min = lt.tm_min;
else need_full_compare = TRUE;
- if ( comp.tm_mon < 0 ) lt.tm_mon = -1;
+ if ( comp.tm_mon < 0 ) comp.tm_mon = lt.tm_mon;
else need_full_compare = TRUE;
- if ( comp.tm_hour < 0 ) lt.tm_hour = -1;
+ if ( comp.tm_hour < 0 ) comp.tm_hour = lt.tm_hour;
else need_full_compare = TRUE;
- if ( comp.tm_mday < 0 ) lt.tm_mday = -1;
+ if ( comp.tm_mday < 0 ) comp.tm_mday = lt.tm_mday;
else need_full_compare = TRUE;
- if ( comp.tm_year < 0 ) lt.tm_year = -1;
+ if ( comp.tm_year < 0 ) comp.tm_year = lt.tm_year;
else need_full_compare = TRUE;
if ( comp.tm_wday < 0 ) lt.tm_wday = -1;
|