aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2012-11-26 22:43:04 +0000
committercorvid <corvid@lavabit.com>2012-11-26 22:43:04 +0000
commitc58af8aa171908de5e0e069754803235f8ea70f8 (patch)
tree6f33036722fda01ba1f3c1efcb5fdd90e903f823 /src
parent056ee1ab2d4e07582651cb95e0abf46a5ccce506 (diff)
MSG_ERR when https query truncated
e.g., uploading image data via file input
Diffstat (limited to 'src')
-rw-r--r--src/capi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/capi.c b/src/capi.c
index 1da2d9ca..0d7e79a4 100644
--- a/src/capi.c
+++ b/src/capi.c
@@ -302,7 +302,11 @@ static char *Capi_dpi_build_cmd(DilloWeb *web, char *server)
/* Let's be kind and make the HTTP query string for the dpi */
char *proxy_connect = a_Http_make_connect_str(web->url);
Dstr *http_query = a_Http_make_query_str(web->url, web->requester,FALSE);
- /* BUG: embedded NULLs in query data will truncate message */
+
+ if ((uint_t) http_query->len > strlen(http_query->str)) {
+ /* Can't handle NULLs embedded in query data */
+ MSG_ERR("HTTPS query truncated!\n");
+ }
/* BUG: WORKAROUND: request to only check the root URL's certificate.
* This avoids the dialog bombing that stems from loading multiple