summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-05-26 10:13:31 -0400
committerSimo Sorce <ssorce@redhat.com>2009-05-26 10:13:31 -0400
commita3888d4941aaf3903c2406f739dd8cd9ed836dad (patch)
tree2a1b39067d7c869315088a82f85d248e16a489ea /server
parent260425e982bd22b1adee9446acbfc098983c4be8 (diff)
downloadsssd-a3888d4941aaf3903c2406f739dd8cd9ed836dad.tar.gz
sssd-a3888d4941aaf3903c2406f739dd8cd9ed836dad.tar.xz
sssd-a3888d4941aaf3903c2406f739dd8cd9ed836dad.zip
Stop overwriting the stack
Actually use the buffer not it's location on the stack.
Diffstat (limited to 'server')
-rw-r--r--server/monitor/monitor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c
index 2db233d8a..26c600705 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,