problem with path marshalling with the unix domain protocol

This commit is contained in:
bdc 1996-10-02 05:24:56 +00:00
parent 7223f37439
commit 871cfe32b5
2 changed files with 6 additions and 3 deletions

View File

@ -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) on HP-UX use dld dynamic loader for symbol lookup (faster)
reported by Bill Sommerfeld 31 Oct 95. Fixed by bdc 27 Sept 96. 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.

View File

@ -44,7 +44,7 @@ int scheme_bind(int sockfd, int family, scheme_value scheme_name)
strncpy(name.sun_path, strncpy(name.sun_path,
ADDRESS_AFTER_HEADER(scheme_name,char), ADDRESS_AFTER_HEADER(scheme_name,char),
scheme_length); /* copy to c string */ 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))); return(bind(sockfd,(struct sockaddr *)&name,sizeof(name)));
break; break;
} }
@ -81,7 +81,7 @@ int scheme_connect(int sockfd, int family, scheme_value scheme_name)
strncpy(name.sun_path, strncpy(name.sun_path,
ADDRESS_AFTER_HEADER(scheme_name,char), ADDRESS_AFTER_HEADER(scheme_name,char),
scheme_length); /* copy to c string */ 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))); return(connect(sockfd,(struct sockaddr *)&name,sizeof(name)));
break; break;
} }
@ -265,7 +265,7 @@ int send_substring(int s,
strncpy(name.sun_path, strncpy(name.sun_path,
ADDRESS_AFTER_HEADER(scheme_name,char), ADDRESS_AFTER_HEADER(scheme_name,char),
scheme_length); /* copy to c string */ 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, return(sendto(s,
StrByte(buf,start), end-start, StrByte(buf,start), end-start,
flags, flags,