|
|
@@ -176,6 +176,8 @@ int vcc_message_broadcast(char *msg, char *usrname, int except_fd, int flags) {
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
+ memset(req, 0, sizeof(struct vcc_request));
|
|
|
+
|
|
|
req->magic = htonl(VCC_MAGIC);
|
|
|
req->reqtype = htonl(REQ_MSG_NEW);
|
|
|
req->uid = 0;
|
|
|
@@ -184,7 +186,7 @@ int vcc_message_broadcast(char *msg, char *usrname, int except_fd, int flags) {
|
|
|
/* no htonl(), because we didn't ntohl() */
|
|
|
req->flags = flags;
|
|
|
|
|
|
- memcpy(req->msg, msg, MSG_SIZE);
|
|
|
+ strncpy(req->msg, msg, MSG_SIZE);
|
|
|
strncpy(req->usrname, usrname, USRNAME_SIZE);
|
|
|
|
|
|
vcc_send_req(n, req);
|