FreeBSD Bugzilla – Attachment 597 Details for
Bug 2577
rlogin (kcmd.c) root-level, local+remote (passive) security hole
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.07 KB, created by
Julian Assange
on 1997-01-25 13:40:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Julian Assange
Created:
1997-01-25 13:40:01 UTC
Size:
1.07 KB
patch
obsolete
>--- src/usr.bin/rlogin/kcmd.c.orig Sun Jan 26 00:26:44 1997 >+++ src/usr.bin/rlogin/kcmd.c Sun Jan 26 00:26:48 1997 >@@ -106,7 +106,11 @@ > return (-1); > } > >- host_save = malloc(strlen(hp->h_name) + 1); >+ if (!(host_save = malloc(strlen(hp->h_name) + 1))) { >+ perror("malloc"); >+ return -1; >+ } >+ > strcpy(host_save, hp->h_name); > *ahost = host_save; > >@@ -131,9 +135,9 @@ > fcntl(s, F_SETOWN, pid); > sin.sin_family = hp->h_addrtype; > #if defined(ultrix) || defined(sun) >- bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, hp->h_length); >+ bcopy(hp->h_addr, (caddr_t)&sin.sin_addr, sizeof sin.sin_addr); > #else >- bcopy(hp->h_addr_list[0], (caddr_t)&sin.sin_addr, hp->h_length); >+ bcopy(hp->h_addr_list[0], (caddr_t)&sin.sin_addr, sizeof sin.sin_addr); > #endif > sin.sin_port = rport; > if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0) >@@ -162,7 +166,7 @@ > perror(NULL); > hp->h_addr_list++; > bcopy(hp->h_addr_list[0], (caddr_t)&sin.sin_addr, >- hp->h_length); >+ sizeof sin.sin_addr); > fprintf(stderr, "Trying %s...\n", > inet_ntoa(sin.sin_addr)); > continue;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2577
: 597