summaryrefslogtreecommitdiff
path: root/utils/file.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2016-07-24 13:59:30 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2016-07-24 14:03:16 +0100
commitfa2e3b778465cd496aedde8e187038835a765c4f (patch)
tree106aaf119a4b3925769adb49479274f3c886a148 /utils/file.c
parentcf753f20cc2a8506c831a5cedd933e3e78417261 (diff)
downloadnetsurf-fa2e3b778465cd496aedde8e187038835a765c4f.tar.gz
netsurf-fa2e3b778465cd496aedde8e187038835a765c4f.tar.bz2
URL unescape: return the new length to the caller.
The avoids situations were we threw away the length, only for the caller to have to strlen the returned string. Note, there seems to be a case of the amiga front end writing beyond end of allocation. Added a TODO for now.
Diffstat (limited to 'utils/file.c')
-rw-r--r--utils/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/file.c b/utils/file.c
index 6224d1c3c..3ec97dec6 100644
--- a/utils/file.c
+++ b/utils/file.c
@@ -138,6 +138,7 @@ static nserror posix_nsurl_to_path(struct nsurl *url, char **path_out)
res = url_unescape(lwc_string_data(urlpath),
lwc_string_length(urlpath),
+ NULL,
&path);
lwc_string_unref(urlpath);
if (res != NSERROR_OK) {