diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-05-26 10:13:31 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-05-26 10:13:31 -0400 |
commit | a3888d4941aaf3903c2406f739dd8cd9ed836dad (patch) | |
tree | 2a1b39067d7c869315088a82f85d248e16a489ea | |
parent | 260425e982bd22b1adee9446acbfc098983c4be8 (diff) | |
download | sssd-a3888d4941aaf3903c2406f739dd8cd9ed836dad.tar.gz sssd-a3888d4941aaf3903c2406f739dd8cd9ed836dad.tar.bz2 sssd-a3888d4941aaf3903c2406f739dd8cd9ed836dad.zip |
Stop overwriting the stack
Actually use the buffer not it's location on the stack.
-rw-r--r-- | server/monitor/monitor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c index 2db233d8..26c60070 100644 --- a/server/monitor/monitor.c +++ b/server/monitor/monitor.c @@ -1128,7 +1128,7 @@ static void config_file_changed(struct tevent_context *ev, total_len = 0; while (total_len < event_size) { - len = read(file_ctx->fd, &buf+total_len, event_size-total_len); + len = read(file_ctx->fd, buf+total_len, event_size-total_len); if (len == -1 && errno != EINTR) { DEBUG(0, ("Critical error reading inotify file descriptor.\n")); talloc_free(tmp_ctx); @@ -1137,7 +1137,7 @@ static void config_file_changed(struct tevent_context *ev, total_len += len; } - in_event = (struct inotify_event *)&buf; + in_event = (struct inotify_event *)buf; if (in_event->len > 0) { /* Read in the name, even though we don't use it, |