summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-05-03 12:23:44 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-05-03 12:23:44 +0000
commit92085171880640cf4bba0de6b78879b476a7b8cd (patch)
tree8a313048dc9fe03105839033c8a2e37b75856f34
parenta71284ce30d1079660fdd1b2b4724ba5efd8aa4a (diff)
Use malloced memory instead of stack-allocated, so that MALLOC_CHECK_=2
2006-05-03 Matthias Clasen <mclasen@redhat.com> * tests/base64-test.c (test_incremental): Use malloced memory instead of stack-allocated, so that MALLOC_CHECK_=2 catches the OOB write...
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.pre-2-1210
-rw-r--r--tests/base64-test.c12
3 files changed, 30 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ef05f14b7..914f60f58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-05-03 Matthias Clasen <mclasen@redhat.com>
+
+ * tests/base64-test.c (test_incremental): Use malloced memory
+ instead of stack-allocated, so that MALLOC_CHECK_=2 catches
+ the OOB write...
+
+ * glib/gbookmarkfile.c (g_bookmark_file_load_from_data): Remove
+ an overzealous return_if_fail check that causes make check to
+ fail.
+
2006-05-02 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version
diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12
index ef05f14b7..914f60f58 100644
--- a/ChangeLog.pre-2-12
+++ b/ChangeLog.pre-2-12
@@ -1,3 +1,13 @@
+2006-05-03 Matthias Clasen <mclasen@redhat.com>
+
+ * tests/base64-test.c (test_incremental): Use malloced memory
+ instead of stack-allocated, so that MALLOC_CHECK_=2 catches
+ the OOB write...
+
+ * glib/gbookmarkfile.c (g_bookmark_file_load_from_data): Remove
+ an overzealous return_if_fail check that causes make check to
+ fail.
+
2006-05-02 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version
diff --git a/tests/base64-test.c b/tests/base64-test.c
index 6c458d2ea..6484988e5 100644
--- a/tests/base64-test.c
+++ b/tests/base64-test.c
@@ -11,13 +11,16 @@ static guchar data[DATA_SIZE];
static void
test_incremental (gboolean line_break)
{
- char text[DATA_SIZE * 2];
char *p;
- guchar data2[DATA_SIZE];
int i;
gsize len, decoded_len, max;
int state, save;
guint decoder_save;
+ char *text;
+ guchar *data2;
+
+ data2 = g_malloc (DATA_SIZE);
+ text = g_malloc (DATA_SIZE * 2);
len = 0;
state = 0;
@@ -65,6 +68,9 @@ test_incremental (gboolean line_break)
g_print ("Wrong decoded base64 data\n");
exit (1);
}
+
+ g_free (text);
+ g_free (data2);
}
static void
@@ -90,6 +96,8 @@ test_full (void)
g_print ("Wrong decoded base64 data\n");
exit (1);
}
+
+ g_free (data2);
}
int