]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/gstreamer0-10.git/commitdiff
gst/gstvalue.c: revert last patch, only dom a g_utf8_validate now before accepting...
authorBenjamin Otte <otte@gnome.org>
Fri, 17 Dec 2004 02:52:24 +0000 (02:52 +0000)
committerBenjamin Otte <otte@gnome.org>
Fri, 17 Dec 2004 02:52:24 +0000 (02:52 +0000)
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

ChangeLog
gst/gstvalue.c
tests/old/testsuite/caps/value_serialize.c
testsuite/caps/value_serialize.c

index 31dad5aaf7eb15803a97f83b9b6ae988cf391c6f..74e4c31e745789275b82715006879293c4e22bd9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * win32/gstenumtypes.c: Update from gst/gstenumtypes.c (See
index 1f8549c0f87c1e7897661614ec8ba90851aa20c3..526110fd26a97898c7c480b938e14b0cf71e3148 100644 (file)
@@ -1332,11 +1332,7 @@ 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')
+    if (!g_utf8_validate (s, -1, NULL))
       return FALSE;
     g_value_set_string (dest, s);
     return TRUE;
index b6980045ee8223e247c90562938f99300ee81af9..c621568c73bcaa29afa3da14c91ae23eeb08b139 100644 (file)
@@ -76,8 +76,11 @@ test_string_deserialization (void)
     "\"\\0\"", NULL},           /* unfinished escaped character */
     {
     "\" \"", 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 */
+#endif
   };
   guint i;
   GValue v = { 0, };
index b6980045ee8223e247c90562938f99300ee81af9..c621568c73bcaa29afa3da14c91ae23eeb08b139 100644 (file)
@@ -76,8 +76,11 @@ test_string_deserialization (void)
     "\"\\0\"", NULL},           /* unfinished escaped character */
     {
     "\" \"", 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 */
+#endif
   };
   guint i;
   GValue v = { 0, };