[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xenstore: check socket path length before copying it
commit f220279c14f5bcbaeb520c4f2498f25d795213e6 Author: Matthew Daley <mattjd@xxxxxxxxx> AuthorDate: Wed Sep 18 15:37:56 2013 +1200 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed Sep 25 13:23:12 2013 +0100 xenstore: check socket path length before copying it Coverity-ID: 1055997 Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/xenstore/xs.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c index 86ef6c7..b1e6820 100644 --- a/tools/xenstore/xs.c +++ b/tools/xenstore/xs.c @@ -196,6 +196,10 @@ static int get_socket(const char *connect_to) goto error; addr.sun_family = AF_UNIX; + if(strlen(connect_to) >= sizeof(addr.sun_path)) { + errno = EINVAL; + goto error; + } strcpy(addr.sun_path, connect_to); if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) != 0) -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |