FreeBSD Bugzilla – Attachment 201752 Details for
Bug 235121
shells/rssh: rssh crashes on invocation due to new basename(3) POSIX behaviour
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
comply POSIX standard when using basename, part 1
patch-log.c (text/plain), 766 bytes, created by
topical
on 2019-02-05 11:46:27 UTC
(
hide
)
Description:
comply POSIX standard when using basename, part 1
Filename:
MIME Type:
Creator:
topical
Created:
2019-02-05 11:46:27 UTC
Size:
766 bytes
patch
obsolete
>--- log.c.orig >+++ log.c >@@ -85,21 +85,20 @@ char *log_set_ident( const char *name ) > char *log_make_ident( const char *name ) > { > char *temp; >+ char *new_ident; > >- /* lose the existing value of ident, if there is one */ >- if ( ident ){ >- free(ident); >- ident = NULL; >- } > /* assign new value to ident from name */ >- if ( !name ) return (ident = NULL); >- ident = strdup(basename((char*)name)); >+ if ( !name ) return (log_set_ident( name )); >+ >+ temp = strdup(name); >+ new_ident = strdup(basename(temp)); >+ > /* remove leading '-' from ident, if there is one */ >- if ( ident[0] == '-' ){ >- temp = strdup(ident + 1); >- free(ident); >- ident = temp; >- } >+ if (new_ident[0] == '-') >+ ++new_ident; >+ >+ log_set_ident(new_ident); >+ free(temp); > return ident; > } >
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 235121
:
201321
|
201322
|
201752
|
201753
|
201754
|
201755
|
202073
|
202528