diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-04-02 00:03:52 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-04-02 00:03:52 +0000 |
commit | 647a720cfb06bdf0dfc8fcdcab50aadcceb0494d (patch) | |
tree | d2c118b8c82011278153c69213eac01bca2cf561 /source/lib | |
parent | 1a3f8a5f8ad97b2d431b22fbda74cc3f2400e2f9 (diff) | |
download | samba-647a720cfb06bdf0dfc8fcdcab50aadcceb0494d.tar.gz samba-647a720cfb06bdf0dfc8fcdcab50aadcceb0494d.tar.xz samba-647a720cfb06bdf0dfc8fcdcab50aadcceb0494d.zip |
OHKAWA Yuichi (kuri@makino.ecei.tohoku.ac.jp) points out that using
decoded.length after it's been zero'ed out by data_blob_free() doesn't
give you the original length...
Andrew Bartlett
Diffstat (limited to 'source/lib')
-rw-r--r-- | source/lib/util_str.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/lib/util_str.c b/source/lib/util_str.c index 4d955c59a70..e2f9f19f581 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -1662,10 +1662,10 @@ void base64_decode_inplace(char *s) { DATA_BLOB decoded = base64_decode_data_blob(s); memcpy(s, decoded.data, decoded.length); - data_blob_free(&decoded); - /* null terminate */ s[decoded.length] = '\0'; + + data_blob_free(&decoded); } /** |