[glib] Add warning to g_base64_decode()



commit 9a08d81b0d58d78e7f2353a088690d8d243d4425
Author: David Schleef <ds schleef org>
Date:   Sun Mar 17 15:56:17 2013 -0700

    Add warning to g_base64_decode()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696015

 glib/gbase64.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/glib/gbase64.c b/glib/gbase64.c
index bcc59a6..cc6cbfc 100644
--- a/glib/gbase64.c
+++ b/glib/gbase64.c
@@ -389,7 +389,9 @@ g_base64_decode_step (const gchar  *in,
  * @text: zero-terminated string with base64 text to decode
  * @out_len: (out): The length of the decoded data is written here
  *
- * Decode a sequence of Base-64 encoded text into binary data
+ * Decode a sequence of Base-64 encoded text into binary data.  Note
+ * that the returned binary data is not necessarily zero-terminated,
+ * so it should not be used as a character string.
  *
  * Return value: (transfer full) (array length=out_len) (element-type guint8):
  *               newly allocated buffer containing the binary data


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]