Displaying 5 results from an estimated 5 matches for "swfdec_urldecode_one_str".
2007 Nov 10
0
[PATCH] swfdec: better variable parsing.
...eing passed
in the value of a variable and other things.
Pages which where broken included the flash at the upper right
corner of http://www.kanal5.se and the presentation of houses for
sale at http://www.svenskfast.se.
Solution: use swfdec_as_object_decode and kill off swfdec_movie_set_variables,
swfdec_urldecode_one_string, swfdec_urldecode_one and the flawed testcase in
test/various/urlencode.c.
---
Since the segfault where just fixed in git, I've now tested this patch which
works perfectly as far as I can see.
diffstat:
 b/libswfdec/swfdec_loader.c          |  106 ---------------------------------
 b/lib...
2007 Nov 12
0
2 commits - libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_resource.c test/various
...of a variable and other things.
    Pages which where broken included the flash at the upper right
    corner of http://www.kanal5.se and the presentation of houses for
    sale at http://www.svenskfast.se.
    
    Solution: use swfdec_as_object_decode and kill off swfdec_movie_set_variables,
    swfdec_urldecode_one_string, swfdec_urldecode_one and the flawed testcase in
    test/various/urlencode.c.
diff --git a/libswfdec/swfdec_loader.c b/libswfdec/swfdec_loader.c
index 7595c4e..f2c16f6 100644
--- a/libswfdec/swfdec_loader.c
+++ b/libswfdec/swfdec_loader.c
@@ -608,54 +608,6 @@ swfdec_urlencode_append_string (GS...
2007 Feb 15
0
8 commits - libswfdec/swfdec_bits.h libswfdec/swfdec_font.c libswfdec/swfdec_font.h libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_tag.c libswfdec/swfdec_text.c libswfdec/swfdec_text.h test/swfedit_token.c test/various
...g_assert (s != NULL);
+  while (*s) {
+    if (g_ascii_isalnum (*s))
+      g_string_append_c (str, *s);
+    else if (*s == ' ')
+      g_string_append_c (str, '+');
+    else
+      g_string_append_printf (str, "%%%02X", (guint) *s);
+    s++;
+  }
+}
+
+static char *
+swfdec_urldecode_one_string (const char *s, const char **out)
+{
+  GString *ret = g_string_new ("");
+
+  while (*s) {
+    if (g_ascii_isalnum (*s)) {
+      g_string_append_c (ret, *s);
+    } else if (*s == '+') {
+      g_string_append_c (ret, ' ');
+    } else if (*s == '%') {
+...
2007 Feb 17
0
8 commits - configure.ac doc/swfdec-sections.txt libswfdec/swfdec_loader.c libswfdec/swfdec_player.c libswfdec/swfdec_player.h libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h
...ode_append_string (GString *str, const char *s)
 {
   g_assert (s != NULL);
   while (*s) {
-    if (g_ascii_isalnum (*s))
+    if (strchr (urlencode_unescaped, *s))
       g_string_append_c (str, *s);
     else if (*s == ' ')
       g_string_append_c (str, '+');
@@ -414,7 +416,7 @@ swfdec_urldecode_one_string (const char 
   GString *ret = g_string_new ("");
 
   while (*s) {
-    if (g_ascii_isalnum (*s)) {
+    if (strchr (urlencode_unescaped, *s)) {
       g_string_append_c (ret, *s);
     } else if (*s == '+') {
       g_string_append_c (ret, ' ');
diff-tree a9cde2bc0e6c...
2007 Jul 18
0
12 commits - configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_playback_alsa.c libswfdec/jpeg libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c
...istener->n_entries + 16;
 
     mem = g_try_realloc (listener->entries, sizeof (SwfdecListenerEntry) * new_len);
diff --git a/libswfdec/swfdec_loader.c b/libswfdec/swfdec_loader.c
index 2416c61..aa41e59 100644
--- a/libswfdec/swfdec_loader.c
+++ b/libswfdec/swfdec_loader.c
@@ -694,7 +694,7 @@ swfdec_urldecode_one_string (const char 
  * to the given @str
  **/
 void
-swfdec_string_append_urlencoded (GString *str, char *name, char *value)
+swfdec_string_append_urlencoded (GString *str, const char *name, const char *value)
 {
   g_return_if_fail (str != NULL);
   g_return_if_fail (name != NULL);
diff --git a/libs...