From d0553a544500ee433a4419bba318e3338f4cfcc4 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Tue, 19 Jul 1988 06:11:42 +0000 Subject: fix possible problem with uninitialized fields in notice structure --- server/uloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/uloc.c') diff --git a/server/uloc.c b/server/uloc.c index 7b25aaf..5ed666c 100644 --- a/server/uloc.c +++ b/server/uloc.c @@ -295,7 +295,6 @@ struct sockaddr_in *who; char *pkt; ZClient_t *client; - (void) bzero((char *)&sense_notice, sizeof(sense_notice)); /* XXX todo: have the messsage print the IP addr */ /* someone tried an unauthentic logout. Try to send a message @@ -313,6 +312,8 @@ struct sockaddr_in *who; owner.sin_addr.s_addr = loc->zlt_addr.s_addr; owner.sin_port = loc->zlt_port; + sense_notice = *notice; /* copy all fields */ + /* and change the ones we need to */ sense_notice.z_kind = ACKED; sense_notice.z_port = loc->zlt_port; sense_notice.z_class = "MESSAGE"; -- cgit v1.2.3