changeset 164:95be5cd3c392

- Fixed a decoding bug in the datauri dpi.
author jcid
date Sun, 06 Apr 2008 19:09:42 +0200
parents 9b036ecc40a4
children c990d3b91b77
files ChangeLog dpi/datauri.c
diffstat 2 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Apr 06 18:58:30 2008 +0200
+++ b/ChangeLog	Sun Apr 06 19:09:42 2008 +0200
@@ -88,6 +88,7 @@
  - Fixed a bug in a_Url_cmp.
  - Fixed a bug in Cookies_parse_one. Set it to a single return potint too!
  - Added dStr_memmem() to dlib.
+ - Fixed a decoding bug in the datauri dpi.
    Patches: place
 +- Fixed a problem with locally-installed dpis.
  - Added code for optional image loading (nice interface) very advanced!
--- a/dpi/datauri.c	Sun Apr 06 18:58:30 2008 +0200
+++ b/dpi/datauri.c	Sun Apr 06 19:09:42 2008 +0200
@@ -252,11 +252,9 @@
 
    if (p) {
       ++p;
+      data = (unsigned char *)a_Url_decode_hex_str(p, p_sz);
       if (is_base64) {
-         data = (unsigned char *)dStrdup(p);
          *p_sz = (size_t) b64decode(data);
-      } else {
-         data = (unsigned char *)a_Url_decode_hex_str(p, p_sz);
       }
    } else {
       data = (unsigned char *)dStrdup("");
@@ -278,7 +276,6 @@
    /* Initialize the SockHandler */
    sh = sock_handler_new(STDIN_FILENO, STDOUT_FILENO, 8*1024);
 
-   /* wget may need to write a temporary file... */
    chdir("/tmp");
 
    /* Read the dpi command from STDIN */