gst/gstvalue.c: check that a simple string that gets deserialized does not contain invalid characters

Original commit message from CVS:
* gst/gstvalue.c: (gst_value_deserialize_string):
check that a simple string that gets deserialized does not contain
invalid characters
* testsuite/caps/value_serialize.c: (test_string_deserialization):
remove a test that tested a wring behaviour
This commit is contained in:
Benjamin Otte 2004-12-16 20:56:52 +00:00
parent 48c7d4dbc5
commit 0c11c636bd
4 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,11 @@
2004-12-16 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/gstvalue.c: (gst_value_deserialize_string):
check that a simple string that gets deserialized does not contain
invalid characters
* testsuite/caps/value_serialize.c: (test_string_deserialization):
remove a test that tested a wring behaviour
2004-12-16 Matt Kraai <kraai@alumni.cmu.edu>
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>

View file

@ -1332,6 +1332,12 @@ static gboolean
gst_value_deserialize_string (GValue * dest, const char *s)
{
if (*s != '"') {
const gchar *t = s;
while (GST_ASCII_IS_STRING (*t))
t++;
if (!*t == '\0')
return FALSE;
g_value_set_string (dest, s);
return TRUE;
} else {

View file

@ -62,7 +62,6 @@ test_string_deserialization (void)
} tests[] = {
{
"", ""}, {
"\\", "\\"}, {
"\"\"", ""},
/* FAILURES */
{

View file

@ -62,7 +62,6 @@ test_string_deserialization (void)
} tests[] = {
{
"", ""}, {
"\\", "\\"}, {
"\"\"", ""},
/* FAILURES */
{