diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-08-30 00:41:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:58 -0500 |
commit | 7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22 (patch) | |
tree | 31b40e747ae679f4d6eeef2f8b3999070c747ea6 /source4/scripting/ejs/smbcalls_ldb.c | |
parent | 37194224416d7509a457ee4aa18991b8bab0da7d (diff) | |
download | samba-7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22.tar.gz samba-7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22.tar.bz2 samba-7be4cf8c1ded42daf7e86ecd2c0dbfeeed312b22.zip |
r9770: Couple other bugfixes
Update TODO-list
(This used to be commit d9541535e3f9e1c058410eeb0a54d60181572f2b)
Diffstat (limited to 'source4/scripting/ejs/smbcalls_ldb.c')
-rw-r--r-- | source4/scripting/ejs/smbcalls_ldb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/ejs/smbcalls_ldb.c b/source4/scripting/ejs/smbcalls_ldb.c index 662da0d971..aabd43d1ac 100644 --- a/source4/scripting/ejs/smbcalls_ldb.c +++ b/source4/scripting/ejs/smbcalls_ldb.c @@ -264,6 +264,7 @@ static int ejs_base64encode(MprVarHandle eid, int argc, struct MprVar **argv) } blob = mprToDataBlob(argv[0]); + mprAssert(blob); ret = ldb_base64_encode(mprMemCtx(), (char *)blob->data, blob->length); if (!ret) { @@ -297,7 +298,10 @@ static int ejs_base64decode(MprVarHandle eid, int argc, struct MprVar **argv) if (ret == -1) { mpr_Return(eid, mprCreateUndefinedVar()); } else { - mpr_Return(eid, mprData((uint8_t *)tmp, ret)); + DATA_BLOB blob; + blob.data = (uint8_t *)tmp; + blob.length = ret; + mpr_Return(eid, mprDataBlob(blob)); } talloc_free(tmp); |