[SCM] Samba Shared Repository - branch v3-0-test updated -
release-3-0-29-87-ga33dcc6
Jeremy Allison
jra at samba.org
Thu Jul 10 17:08:25 GMT 2008
The branch, v3-0-test has been updated
via a33dcc6ac77a26e6b88cc2ff5cca93e20019df76 (commit)
from 4e3bbdebfefa447b415c1a2769cadb8375397736 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test
- Log -----------------------------------------------------------------
commit a33dcc6ac77a26e6b88cc2ff5cca93e20019df76
Author: Jeremy Allison <jra at samba.org>
Date: Thu Jul 10 10:05:00 2008 -0700
Fix from Volker. Fix a segfault in base64_encode_data_blob
We did not allocate enough memory for the \0 and a = at the end.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/lib/util_str.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index 3059a1b..c4d67c6 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -2308,7 +2308,9 @@ char * base64_encode_data_blob(DATA_BLOB data)
out_cnt = 0;
len = data.length;
- output_len = data.length * 2;
+ output_len = data.length * 2 + 4; /* Account for closing bytes. 4 is
+ * random but should be enough for
+ * the = and \0 */
result = (char *)SMB_MALLOC(output_len); /* get us plenty of space */
while (len-- && out_cnt < (data.length * 2) - 5) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list