public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: prajnoha@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2/libdaemon client/daemon-client.c server/d ...
Date: Tue, 10 Apr 2012 12:55:00 -0000	[thread overview]
Message-ID: <20120410125538.11780.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha@sourceware.org	2012-04-10 12:55:38

Modified files:
	libdaemon/client: daemon-client.c 
	libdaemon/server: daemon-server.c 

Log message:
	strcpy -> strncpy in common daemon code.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdaemon/client/daemon-client.c.diff?cvsroot=lvm2&r1=1.3&r2=1.4
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdaemon/server/daemon-server.c.diff?cvsroot=lvm2&r1=1.6&r2=1.7

--- LVM2/libdaemon/client/daemon-client.c	2012/03/01 21:12:40	1.3
+++ LVM2/libdaemon/client/daemon-client.c	2012/04/10 12:55:37	1.4
@@ -32,7 +32,7 @@
 		goto error;
 
 	memset(&sockaddr, 0, sizeof(sockaddr));
-	strcpy(sockaddr.sun_path, i.socket);
+	strncpy(sockaddr.sun_path, i.socket, sizeof(sockaddr.sun_path));
 	sockaddr.sun_family = AF_UNIX;
 	if (connect(h.socket_fd,(struct sockaddr *) &sockaddr, sizeof(sockaddr)))
 		goto error;
--- LVM2/libdaemon/server/daemon-server.c	2012/03/16 21:30:53	1.6
+++ LVM2/libdaemon/server/daemon-server.c	2012/04/10 12:55:38	1.7
@@ -224,7 +224,7 @@
 
 	fprintf(stderr, "[D] creating %s\n", s.socket_path);
 	memset(&sockaddr, 0, sizeof(sockaddr));
-	strcpy(sockaddr.sun_path, s.socket_path);
+	strncpy(sockaddr.sun_path, s.socket_path, sizeof(sockaddr.sun_path));
 	sockaddr.sun_family = AF_UNIX;
 
 	if (bind(fd, (struct sockaddr *) &sockaddr, sizeof(sockaddr))) {


             reply	other threads:[~2012-04-10 12:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 12:55 prajnoha [this message]
2012-04-27  9:52 prajnoha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120410125538.11780.qmail@sourceware.org \
    --to=prajnoha@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).