Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timeutils: fix bad pointer cast that leads to timestamp overwriting #305

Merged
merged 1 commit into from
Nov 20, 2014

Conversation

lbudai
Copy link
Collaborator

@lbudai lbudai commented Nov 20, 2014

In log_msg_parse_date() the variable now is of type GTimeVal.
Its member tv_sec is of type long, and its address was cast to a time_t
pointer.
This led bad argument passing to the cached_localtime() function.

Fixes: #304

Signed-off-by: Budai Laszlo Laszlo.Budai@balabit.com

In `log_msg_parse_date()` the variable `now` is of type `GTimeVal`.
Its member `tv_sec` is of type `long`, and its address was cast to a `time_t`
pointer.
This led bad argument passing to the `cached_localtime()` function.

Fixes: syslog-ng#304

Signed-off-by: Budai Laszlo <Laszlo.Budai@balabit.com>
juhaszviktor added a commit that referenced this pull request Nov 20, 2014
timeutils: fix bad pointer cast that leads to timestamp overwriting
@juhaszviktor juhaszviktor merged commit 806378e into syslog-ng:3.6/master Nov 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants