diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2016-07-24 13:59:30 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2016-07-24 14:03:16 +0100 |
commit | fa2e3b778465cd496aedde8e187038835a765c4f (patch) | |
tree | 106aaf119a4b3925769adb49479274f3c886a148 /frontends/beos/gui.cpp | |
parent | cf753f20cc2a8506c831a5cedd933e3e78417261 (diff) | |
download | netsurf-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 'frontends/beos/gui.cpp')
-rw-r--r-- | frontends/beos/gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp index 53387ad07..8c6614d17 100644 --- a/frontends/beos/gui.cpp +++ b/frontends/beos/gui.cpp @@ -797,7 +797,7 @@ static char *url_to_path(const char *url) char *url_path; char *path = NULL; - if (url_unescape(url, 0, &url_path) == NSERROR_OK) { + if (url_unescape(url, 0, NULL, &url_path) == NSERROR_OK) { /* return the absolute path including leading / */ path = strdup(url_path + (FILE_SCHEME_PREFIX_LEN - 1)); free(url_path); |