diff options
author | lars@mysql.com <> | 2005-10-14 01:14:23 +0200 |
---|---|---|
committer | lars@mysql.com <> | 2005-10-14 01:14:23 +0200 |
commit | 0abcffcb5df992724794582f21bbcdb552fa6d98 (patch) | |
tree | 9fe13b0ce30556fa9575d30b25fe47c35aac1393 /ndb/src/mgmapi | |
parent | cac5b085cd17836028a2c47c4c19066c4dd0b5a9 (diff) | |
download | mariadb-git-0abcffcb5df992724794582f21bbcdb552fa6d98.tar.gz |
WL#2835: Base64 mysys functions
Diffstat (limited to 'ndb/src/mgmapi')
-rw-r--r-- | ndb/src/mgmapi/mgmapi.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ndb/src/mgmapi/mgmapi.cpp b/ndb/src/mgmapi/mgmapi.cpp index 8263e8cbc93..df27b1b358a 100644 --- a/ndb/src/mgmapi/mgmapi.cpp +++ b/ndb/src/mgmapi/mgmapi.cpp @@ -34,8 +34,8 @@ #include <Parser.hpp> #include <OutputStream.hpp> #include <InputStream.hpp> -#include <Base64.hpp> +#include <base64.h> #define MGM_CMD(name, fun, desc) \ { name, \ @@ -1770,11 +1770,15 @@ ndb_mgm_get_configuration(NdbMgmHandle handle, unsigned int version) { } while(start < len); if(buf64 == 0) break; - + + void *tmp_data = malloc(base64_needed_decoded_length((size_t) (len - 1))); + const int res = base64_decode(buf64, len-1, tmp_data); + delete[] buf64; UtilBuffer tmp; - const int res = base64_decode(buf64, len-1, tmp); - delete[] buf64; - if(res != 0){ + tmp.append((void *) tmp_data, res); + free(tmp_data); + if (res < 0) + { fprintf(handle->errstream, "Failed to decode buffer\n"); break; } |