FreeBSD Bugzilla – Attachment 201322 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]
rssh: pass string copy to basename(3) so it can safely modify it
file_235121.txt (text/plain), 709 bytes, created by
topical
on 2019-01-22 07:43:00 UTC
(
hide
)
Description:
rssh: pass string copy to basename(3) so it can safely modify it
Filename:
MIME Type:
Creator:
topical
Created:
2019-01-22 07:43:00 UTC
Size:
709 bytes
patch
obsolete
>--- util.c.orig >+++ util.c >@@ -163,6 +163,7 @@ bool opt_filter(char **vec, const char opt) > > bool check_command( char *cl, ShellOptions_t *opts, char *cmd, int cmdflag ) > { >+ char *cmd_dup; > char *prog; /* basename of cmd */ > char *tmp = cl; > bool need_free = FALSE; >@@ -186,11 +187,13 @@ bool check_command( char *cl, ShellOptions_t *opts, char *cmd, int cmdflag ) > } > > /* compare tmp to cmd and prog for match */ >- prog = basename(cmd); >+ cmd_dup = strdup(cmd); >+ prog = basename(cmd_dup); > if ( !(strcmp(tmp, cmd)) || !(strcmp(tmp, prog))){ > log_msg("cmd '%s' approved", prog); > rc = TRUE; > } >+ free(cmd_dup); > } > if (need_free) free(tmp); > return rc;
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