Bugzilla – Attachment 2786 Details for
Bug 2540
Adds xstrndup() to xmalloc.h/xmalloc.c in OpenSSH 7.x
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch file for this bug report
xmalloc.c.patch (text/plain), 404 bytes, created by
Bill Parker
on 2016-02-14 08:31:28 AEDT
(
hide
)
Description:
Patch file for this bug report
Filename:
MIME Type:
Creator:
Bill Parker
Created:
2016-02-14 08:31:28 AEDT
Size:
404 bytes
patch
obsolete
>--- xmalloc.c.orig 2016-02-13 09:33:10.108121542 -0800 >+++ xmalloc.c 2016-02-13 09:34:07.203378056 -0800 >@@ -79,6 +79,20 @@ > return cp; > } > >+char * >+xstrndup(const char *str, size_t dst_size) >+{ >+ char *cp; >+ size_t len; >+ >+ len = strlen(str) + 1; >+ if (len > size) >+ len = size + 1; >+ cp = xmalloc(len); >+ strlcpy(cp, str, len); >+ return cp; >+} >+ > int > xasprintf(char **ret, const char *fmt, ...) > {
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
Flags:
wp02855
:
ok?
Actions:
View
|
Diff
Attachments on
bug 2540
:
2785
| 2786