mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-21 18:05:33 +00:00
Pass correct sockaddr size to bind. (#178)
We should be passing the size of the `struct sockaddr_un`, not the length of the path + the size of the path field. There is another `bind` call in this file that had it right.
This commit is contained in:
parent
85aa360f2e
commit
226815dbd8
@ -793,7 +793,7 @@ LispPTR Unix_handlecomm(LispPTR *args) {
|
||||
|
||||
sock.sun_family = AF_UNIX;
|
||||
strcpy(sock.sun_path, shcom);
|
||||
if (bind(sockFD, (struct sockaddr *)&sock, strlen(shcom) + sizeof(sock.sun_family)) < 0) {
|
||||
if (bind(sockFD, (struct sockaddr *)&sock, sizeof(struct sockaddr_un)) < 0) {
|
||||
close(sockFD);
|
||||
free(UJ[sockFD].pathname);
|
||||
UJ[sockFD].type = UJUNUSED;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user