mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
gst/gstvalue.c: revert last patch, only dom a g_utf8_validate now before accepting the string - caps parsing strips "...
Original commit message from CVS: * gst/gstvalue.c: (gst_value_deserialize_string): revert last patch, only dom a g_utf8_validate now before accepting the string - caps parsing strips " from strings so we can't rely on them * testsuite/caps/value_serialize.c: (test_string_deserialization): disable a test that tested the above and comment it
This commit is contained in:
parent
af234f772c
commit
bdc0432ec6
4 changed files with 16 additions and 5 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2004-12-17 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
|
* gst/gstvalue.c: (gst_value_deserialize_string):
|
||||||
|
revert last patch, only dom a g_utf8_validate now before accepting
|
||||||
|
the string - caps parsing strips " from strings so we can't rely on
|
||||||
|
them
|
||||||
|
* testsuite/caps/value_serialize.c: (test_string_deserialization):
|
||||||
|
disable a test that tested the above and comment it
|
||||||
|
|
||||||
2004-12-16 David Schleef <ds@schleef.org>
|
2004-12-16 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* win32/gstenumtypes.c: Update from gst/gstenumtypes.c (See
|
* win32/gstenumtypes.c: Update from gst/gstenumtypes.c (See
|
||||||
|
|
|
@ -1332,11 +1332,7 @@ static gboolean
|
||||||
gst_value_deserialize_string (GValue * dest, const char *s)
|
gst_value_deserialize_string (GValue * dest, const char *s)
|
||||||
{
|
{
|
||||||
if (*s != '"') {
|
if (*s != '"') {
|
||||||
const gchar *t = s;
|
if (!g_utf8_validate (s, -1, NULL))
|
||||||
|
|
||||||
while (GST_ASCII_IS_STRING (*t))
|
|
||||||
t++;
|
|
||||||
if (!*t == '\0')
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
g_value_set_string (dest, s);
|
g_value_set_string (dest, s);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -76,8 +76,11 @@ test_string_deserialization (void)
|
||||||
"\"\\0\"", NULL}, /* unfinished escaped character */
|
"\"\\0\"", NULL}, /* unfinished escaped character */
|
||||||
{
|
{
|
||||||
"\" \"", NULL}, /* spaces must be escaped */
|
"\" \"", NULL}, /* spaces must be escaped */
|
||||||
|
#if 0
|
||||||
|
/* FIXME 0.9: this test should fail, but it doesn't */
|
||||||
{
|
{
|
||||||
"tüüt", NULL} /* string with special chars must be escaped */
|
"tüüt", NULL} /* string with special chars must be escaped */
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
guint i;
|
guint i;
|
||||||
GValue v = { 0, };
|
GValue v = { 0, };
|
||||||
|
|
|
@ -76,8 +76,11 @@ test_string_deserialization (void)
|
||||||
"\"\\0\"", NULL}, /* unfinished escaped character */
|
"\"\\0\"", NULL}, /* unfinished escaped character */
|
||||||
{
|
{
|
||||||
"\" \"", NULL}, /* spaces must be escaped */
|
"\" \"", NULL}, /* spaces must be escaped */
|
||||||
|
#if 0
|
||||||
|
/* FIXME 0.9: this test should fail, but it doesn't */
|
||||||
{
|
{
|
||||||
"tüüt", NULL} /* string with special chars must be escaped */
|
"tüüt", NULL} /* string with special chars must be escaped */
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
guint i;
|
guint i;
|
||||||
GValue v = { 0, };
|
GValue v = { 0, };
|
||||||
|
|
Loading…
Reference in a new issue