netsurf: branch master updated. release/3.3-200-g8e26870
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/8e26870e15b46db20634f...
...commit http://git.netsurf-browser.org/netsurf.git/commit/8e26870e15b46db20634fde...
...tree http://git.netsurf-browser.org/netsurf.git/tree/8e26870e15b46db20634fdef4...
The branch, master has been updated
via 8e26870e15b46db20634fdef4815e6acdc8beb4b (commit)
from ccac30117601f6773c65a07a9f34aab76dbe6fc0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=8e26870e15b46db2063...
commit 8e26870e15b46db20634fdef4815e6acdc8beb4b
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Fix logging to stderr if verbose_log was set before nslog_init was called
diff --git a/utils/log.c b/utils/log.c
index cc3f7a8..43bfbd5 100644
--- a/utils/log.c
+++ b/utils/log.c
@@ -69,9 +69,9 @@ nserror nslog_init(nslog_ensure_t *ensure, int *pargc, char **argv)
/* remove -V and filename from argv list */
for (argcmv = 3; argcmv < (*pargc); argcmv++) {
- argv[argcmv - 1] = argv[argcmv];
+ argv[argcmv - 2] = argv[argcmv];
}
- (*pargc)--;
+ (*pargc) -= 2;
if (logfile == NULL) {
/* could not open log file for output */
@@ -82,6 +82,9 @@ nserror nslog_init(nslog_ensure_t *ensure, int *pargc, char **argv)
/* ensure we actually show logging */
verbose_log = true;
}
+ } else if (verbose_log == true) {
+ /* default is logging to stderr */
+ logfile = stderr;
}
/* ensure output file handle is correctly configured */
-----------------------------------------------------------------------
Summary of changes:
utils/log.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/utils/log.c b/utils/log.c
index cc3f7a8..43bfbd5 100644
--- a/utils/log.c
+++ b/utils/log.c
@@ -69,9 +69,9 @@ nserror nslog_init(nslog_ensure_t *ensure, int *pargc, char **argv)
/* remove -V and filename from argv list */
for (argcmv = 3; argcmv < (*pargc); argcmv++) {
- argv[argcmv - 1] = argv[argcmv];
+ argv[argcmv - 2] = argv[argcmv];
}
- (*pargc)--;
+ (*pargc) -= 2;
if (logfile == NULL) {
/* could not open log file for output */
@@ -82,6 +82,9 @@ nserror nslog_init(nslog_ensure_t *ensure, int *pargc, char **argv)
/* ensure we actually show logging */
verbose_log = true;
}
+ } else if (verbose_log == true) {
+ /* default is logging to stderr */
+ logfile = stderr;
}
/* ensure output file handle is correctly configured */
--
NetSurf Browser
7 years, 11 months
netsurf: branch master updated. release/3.3-199-gccac301
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/ccac30117601f6773c65a...
...commit http://git.netsurf-browser.org/netsurf.git/commit/ccac30117601f6773c65a07...
...tree http://git.netsurf-browser.org/netsurf.git/tree/ccac30117601f6773c65a07a9...
The branch, master has been updated
via ccac30117601f6773c65a07a9f34aab76dbe6fc0 (commit)
from 123c8bc8b3d621d0e259ae9ce99ebe753036ac0b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=ccac30117601f6773c6...
commit ccac30117601f6773c65a07a9f34aab76dbe6fc0
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
Fix a signed comparison error in nsurl parsing.
In utils/nsurl.c the function nsurl__create_from_section() has a
section dealing with non-redundant ports (starting line 973).
lwc_intern_string() was being called with negative lengths and as it
takes a size_t (unsigned) so is getting passed a very large length
which causes a segfault.
this is supposed to be protected by the flag setting on line 969
however the arithmetic is all *unsigned* so the condition never
matches
(gdb) p length - (colon - pegs->at + skip)
$9 = 18446744073709551608
changing the check arithmetic to be a simple comparison against length
prevents this issue and reduces the amount of computation required.
diff --git a/utils/nsurl.c b/utils/nsurl.c
index e0e1472..4454ba8 100644
--- a/utils/nsurl.c
+++ b/utils/nsurl.c
@@ -963,7 +963,7 @@ static nserror nsurl__create_from_section(const char * const url_s,
flags |= NSURL_F_NO_PORT;
}
- if (length - (colon - pegs->at + skip) <= 0) {
+ if (length <= (colon - pegs->at + skip)) {
/* No space for a port after the colon
*/
flags |= NSURL_F_NO_PORT;
-----------------------------------------------------------------------
Summary of changes:
utils/nsurl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/nsurl.c b/utils/nsurl.c
index e0e1472..4454ba8 100644
--- a/utils/nsurl.c
+++ b/utils/nsurl.c
@@ -963,7 +963,7 @@ static nserror nsurl__create_from_section(const char * const url_s,
flags |= NSURL_F_NO_PORT;
}
- if (length - (colon - pegs->at + skip) <= 0) {
+ if (length <= (colon - pegs->at + skip)) {
/* No space for a port after the colon
*/
flags |= NSURL_F_NO_PORT;
--
NetSurf Browser
7 years, 11 months