<div dir="ltr">Hi list<div><br></div><div>auparse breaks if supplied events with timestamps that are less than 10 characters long, including the milliseconds field. This should never happen in production, but it can make for fairly mysterious output during testing if you're generating your own timestamp and eventid numbers :-)</div><div><br></div><div>I think the issue is in the str2event function:</div><div><br></div><div><div>static int str2event(char *s, au_event_t *e)</div><div>{</div><div>        char *ptr;</div></div><div><div>        errno = 0;</div><div>        ptr = strchr(s<b>+10</b>, ':');</div><div>        if (ptr) {</div><div>                e->serial = strtoul(ptr+1, NULL, 10);</div></div><div><br></div><div><div>This function seems to be searching for the colon that splits the timestamp from the eventId, but it's starting at s+10, instead of just s. The variable s points to the first byte after the "msg=audit(" prefix. (10 also happens to be the length of that prefix, which is what made me suspicious this might not be micro-optimization)</div></div><div><br></div><div>-Santosh</div><div><br></div></div>