aboutsummaryrefslogtreecommitdiff
path: root/dpi/datauri.c
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-04-06 19:09:42 +0200
committerjcid <devnull@localhost>2008-04-06 19:09:42 +0200
commit712128411cd5de92d8af95d7571e2773fb541bbf (patch)
treeb33feff2c7c13f2a4105913854adf7dbdcbde0f9 /dpi/datauri.c
parent40334a7897e3b6f81ae957ae518e3e7afade32fe (diff)
- Fixed a decoding bug in the datauri dpi.
Diffstat (limited to 'dpi/datauri.c')
-rw-r--r--dpi/datauri.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/dpi/datauri.c b/dpi/datauri.c
index ef67e5ed..7677fd96 100644
--- a/dpi/datauri.c
+++ b/dpi/datauri.c
@@ -252,11 +252,9 @@ static unsigned char *datauri_get_data(char *url, size_t *p_sz)
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 @@ int main(void)
/* 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 */