mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-22 14:06:23 +00:00
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:
parent
48c7d4dbc5
commit
0c11c636bd
4 changed files with 14 additions and 2 deletions
|
@ -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>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -62,7 +62,6 @@ test_string_deserialization (void)
|
|||
} tests[] = {
|
||||
{
|
||||
"", ""}, {
|
||||
"\\", "\\"}, {
|
||||
"\"\"", ""},
|
||||
/* FAILURES */
|
||||
{
|
||||
|
|
|
@ -62,7 +62,6 @@ test_string_deserialization (void)
|
|||
} tests[] = {
|
||||
{
|
||||
"", ""}, {
|
||||
"\\", "\\"}, {
|
||||
"\"\"", ""},
|
||||
/* FAILURES */
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue