mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
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...
This commit is contained in:
parent
a71284ce30
commit
9208517188
10
ChangeLog
10
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>
|
2006-05-02 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Bump version
|
* configure.in: Bump version
|
||||||
|
@ -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>
|
2006-05-02 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* configure.in: Bump version
|
* configure.in: Bump version
|
||||||
|
@ -11,13 +11,16 @@ static guchar data[DATA_SIZE];
|
|||||||
static void
|
static void
|
||||||
test_incremental (gboolean line_break)
|
test_incremental (gboolean line_break)
|
||||||
{
|
{
|
||||||
char text[DATA_SIZE * 2];
|
|
||||||
char *p;
|
char *p;
|
||||||
guchar data2[DATA_SIZE];
|
|
||||||
int i;
|
int i;
|
||||||
gsize len, decoded_len, max;
|
gsize len, decoded_len, max;
|
||||||
int state, save;
|
int state, save;
|
||||||
guint decoder_save;
|
guint decoder_save;
|
||||||
|
char *text;
|
||||||
|
guchar *data2;
|
||||||
|
|
||||||
|
data2 = g_malloc (DATA_SIZE);
|
||||||
|
text = g_malloc (DATA_SIZE * 2);
|
||||||
|
|
||||||
len = 0;
|
len = 0;
|
||||||
state = 0;
|
state = 0;
|
||||||
@ -65,6 +68,9 @@ test_incremental (gboolean line_break)
|
|||||||
g_print ("Wrong decoded base64 data\n");
|
g_print ("Wrong decoded base64 data\n");
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free (text);
|
||||||
|
g_free (data2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -90,6 +96,8 @@ test_full (void)
|
|||||||
g_print ("Wrong decoded base64 data\n");
|
g_print ("Wrong decoded base64 data\n");
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free (data2);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user