From 871cfe32b5804b88b29fe179e1e5e2d059d97f14 Mon Sep 17 00:00:00 2001 From: bdc Date: Wed, 2 Oct 1996 05:24:56 +0000 Subject: [PATCH] problem with path marshalling with the unix domain protocol --- Error-log | 3 +++ scsh/network1.c | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Error-log b/Error-log index 7e3e435..92edbd8 100644 --- a/Error-log +++ b/Error-log @@ -51,3 +51,6 @@ reported by Lutz Euler 23 Aug 96. Fixed by bdc 26 Sept 96. on HP-UX use dld dynamic loader for symbol lookup (faster) reported by Bill Sommerfeld 31 Oct 95. Fixed by bdc 27 Sept 96. + +problem with path marshalling with the unix domain protocol +Reported by Sean Doran 29 Jul 96. Fixed by bdc 1 Oct 96. diff --git a/scsh/network1.c b/scsh/network1.c index 1c6cd4d..0883f4e 100644 --- a/scsh/network1.c +++ b/scsh/network1.c @@ -44,7 +44,7 @@ int scheme_bind(int sockfd, int family, scheme_value scheme_name) strncpy(name.sun_path, ADDRESS_AFTER_HEADER(scheme_name,char), scheme_length); /* copy to c string */ - name.sun_path[scheme_length+1]='\0'; /* add null */ + name.sun_path[scheme_length]='\0'; /* add null */ return(bind(sockfd,(struct sockaddr *)&name,sizeof(name))); break; } @@ -81,7 +81,7 @@ int scheme_connect(int sockfd, int family, scheme_value scheme_name) strncpy(name.sun_path, ADDRESS_AFTER_HEADER(scheme_name,char), scheme_length); /* copy to c string */ - name.sun_path[scheme_length+1]='\0'; /* add null */ + name.sun_path[scheme_length]='\0'; /* add null */ return(connect(sockfd,(struct sockaddr *)&name,sizeof(name))); break; } @@ -265,7 +265,7 @@ int send_substring(int s, strncpy(name.sun_path, ADDRESS_AFTER_HEADER(scheme_name,char), scheme_length); /* copy to c string */ - name.sun_path[scheme_length+1]='\0'; /* add null */ + name.sun_path[scheme_length]='\0'; /* add null */ return(sendto(s, StrByte(buf,start), end-start, flags,