The Samba-Bugzilla – Attachment 13733 Details for
Bug 13105
1byte heap overflow in sanitize_path
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Use MAX to ensure at least 2 bytes are allocated for dest
sanitize_path_at_least_2.patch (text/plain), 763 bytes, created by
jeriko.one
on 2017-10-27 03:54:14 UTC
(
hide
)
Description:
Use MAX to ensure at least 2 bytes are allocated for dest
Filename:
MIME Type:
Creator:
jeriko.one
Created:
2017-10-27 03:54:14 UTC
Size:
763 bytes
patch
obsolete
>From 48f83712e75754e726c1c3c745ecb938ef3885dc Mon Sep 17 00:00:00 2001 >From: Jeriko One <jeriko.one@gmx.us> >Date: Thu, 26 Oct 2017 20:29:40 -0700 >Subject: [PATCH] allocate at least 2 bytes for dest in sanitize_path > >--- > util.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/util.c b/util.c >index d50900c8..eef5f2bf 100644 >--- a/util.c >+++ b/util.c >@@ -1020,7 +1020,7 @@ char *sanitize_path(char *dest, const char *p, const char *rootdir, int depth, > if (dest) { > if (rlen + plen + 1 >= MAXPATHLEN) > return NULL; >- } else if (!(dest = new_array(char, rlen + plen + 1))) >+ } else if (!(dest = new_array(char, MAX(rlen + plen + 1, 2)))) > out_of_memory("sanitize_path"); > if (rlen) { > memcpy(dest, rootdir, rlen); >-- >2.13.6 >
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 Raw
Actions:
View
Attachments on
bug 13105
: 13733