Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/58fee8749ffe41b0bb7c71456eddb808cbde8821
...commit
http://git.netsurf-browser.org/netsurf.git/commit/58fee8749ffe41b0bb7c71456eddb808cbde8821
...tree
http://git.netsurf-browser.org/netsurf.git/tree/58fee8749ffe41b0bb7c71456eddb808cbde8821
The branch, master has been updated
via 58fee8749ffe41b0bb7c71456eddb808cbde8821 (commit)
via 6848cc890a5eab8ea166b737d7f35a5b8ed94950 (commit)
via ba4c20a0c7213f2b5d0b8b9b7761e73138a7b133 (commit)
via 2b2469df7ef088d219a8bc911769ffde149c1129 (commit)
from 926e560716c56aa0ee6492478ead15f9e6c07fe2 (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=58fee8749ffe41b0bb7c71456eddb808cbde8821
commit 58fee8749ffe41b0bb7c71456eddb808cbde8821
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
gtk/bitmap: Assert surface width/height non-zero
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/frontends/gtk/bitmap.c b/frontends/gtk/bitmap.c
index 36b614c..e7b859d 100644
--- a/frontends/gtk/bitmap.c
+++ b/frontends/gtk/bitmap.c
@@ -478,6 +478,10 @@ bitmap_render(struct bitmap *bitmap, struct hlcache_handle
*content)
* aspect ratio of the required thumbnail. */
cheight = ((cwidth * dheight) + (dwidth / 2)) / dwidth;
+ /* At this point, we MUST have decided to render something non-zero
sized */
+ assert(cwidth > 0);
+ assert(cheight > 0);
+
/* Create surface to render into */
surface = cairo_surface_create_similar(dsurface,
CAIRO_CONTENT_COLOR_ALPHA, cwidth, cheight);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=6848cc890a5eab8ea166b737d7f35a5b8ed94950
commit 6848cc890a5eab8ea166b737d7f35a5b8ed94950
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
browser_window: Check for bw==NULL before dereferencing it
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 3224706..7b553f4 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -2599,14 +2599,14 @@ browser_window_redraw(struct browser_window *bw,
struct rect content_clip;
nserror res;
- x /= bw->scale;
- y /= bw->scale;
-
if (bw == NULL) {
NSLOG(netsurf, INFO, "NULL browser window");
return false;
}
+ x /= bw->scale;
+ y /= bw->scale;
+
if ((bw->current_content == NULL) &&
(bw->children == NULL)) {
/* Browser window has no content, render blank fill */
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=ba4c20a0c7213f2b5d0b8b9b7761e73138a7b133
commit ba4c20a0c7213f2b5d0b8b9b7761e73138a7b133
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
dukky: Fix assignment in assert
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/content/handlers/javascript/duktape/dukky.c
b/content/handlers/javascript/duktape/dukky.c
index 830f481..52a9c82 100644
--- a/content/handlers/javascript/duktape/dukky.c
+++ b/content/handlers/javascript/duktape/dukky.c
@@ -785,7 +785,7 @@ static void dukky_destroythread(jsthread *thread)
jsheap *heap = thread->heap;
assert(thread->in_use == 0);
- assert(thread->pending_destroy = true);
+ assert(thread->pending_destroy == true);
/* Closing down the extant thread */
NSLOG(dukky, DEBUG, "Closing down extant thread %p in heap %p", thread,
heap);
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=2b2469df7ef088d219a8bc911769ffde149c1129
commit 2b2469df7ef088d219a8bc911769ffde149c1129
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
split-messages: Handle gzprintf failing
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/tools/split-messages.c b/tools/split-messages.c
index 0bce739..73a95e1 100644
--- a/tools/split-messages.c
+++ b/tools/split-messages.c
@@ -500,13 +500,21 @@ message_write(struct param *param, struct trnsltn_entry
*tlist)
return NSERROR_PERMISSION;
}
- gzprintf(outf,
+ if (gzprintf(outf,
"# This messages file is automatically generated from %s\n"
"# at build-time. Please go and edit that instead of
this.\n\n",
- param->infilename);
+ param->infilename) < 1) {
+ gzclose(outf);
+ unlink(param->outfilename);
+ return NSERROR_NOSPACE;
+ };
while (tlist != NULL) {
- gzprintf(outf, "%s:%s\n", tlist->key, tlist->value);
+ if (gzprintf(outf, "%s:%s\n", tlist->key, tlist->value) < 1) {
+ gzclose(outf);
+ unlink(param->outfilename);
+ return NSERROR_NOSPACE;
+ }
tlist = tlist->next;
}
-----------------------------------------------------------------------
Summary of changes:
content/handlers/javascript/duktape/dukky.c | 2 +-
desktop/browser_window.c | 6 +++---
frontends/gtk/bitmap.c | 4 ++++
tools/split-messages.c | 14 +++++++++++---
4 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/content/handlers/javascript/duktape/dukky.c
b/content/handlers/javascript/duktape/dukky.c
index 830f481..52a9c82 100644
--- a/content/handlers/javascript/duktape/dukky.c
+++ b/content/handlers/javascript/duktape/dukky.c
@@ -785,7 +785,7 @@ static void dukky_destroythread(jsthread *thread)
jsheap *heap = thread->heap;
assert(thread->in_use == 0);
- assert(thread->pending_destroy = true);
+ assert(thread->pending_destroy == true);
/* Closing down the extant thread */
NSLOG(dukky, DEBUG, "Closing down extant thread %p in heap %p", thread,
heap);
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 3224706..7b553f4 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -2599,14 +2599,14 @@ browser_window_redraw(struct browser_window *bw,
struct rect content_clip;
nserror res;
- x /= bw->scale;
- y /= bw->scale;
-
if (bw == NULL) {
NSLOG(netsurf, INFO, "NULL browser window");
return false;
}
+ x /= bw->scale;
+ y /= bw->scale;
+
if ((bw->current_content == NULL) &&
(bw->children == NULL)) {
/* Browser window has no content, render blank fill */
diff --git a/frontends/gtk/bitmap.c b/frontends/gtk/bitmap.c
index 36b614c..e7b859d 100644
--- a/frontends/gtk/bitmap.c
+++ b/frontends/gtk/bitmap.c
@@ -478,6 +478,10 @@ bitmap_render(struct bitmap *bitmap, struct hlcache_handle
*content)
* aspect ratio of the required thumbnail. */
cheight = ((cwidth * dheight) + (dwidth / 2)) / dwidth;
+ /* At this point, we MUST have decided to render something non-zero
sized */
+ assert(cwidth > 0);
+ assert(cheight > 0);
+
/* Create surface to render into */
surface = cairo_surface_create_similar(dsurface,
CAIRO_CONTENT_COLOR_ALPHA, cwidth, cheight);
diff --git a/tools/split-messages.c b/tools/split-messages.c
index 0bce739..73a95e1 100644
--- a/tools/split-messages.c
+++ b/tools/split-messages.c
@@ -500,13 +500,21 @@ message_write(struct param *param, struct trnsltn_entry
*tlist)
return NSERROR_PERMISSION;
}
- gzprintf(outf,
+ if (gzprintf(outf,
"# This messages file is automatically generated from %s\n"
"# at build-time. Please go and edit that instead of
this.\n\n",
- param->infilename);
+ param->infilename) < 1) {
+ gzclose(outf);
+ unlink(param->outfilename);
+ return NSERROR_NOSPACE;
+ };
while (tlist != NULL) {
- gzprintf(outf, "%s:%s\n", tlist->key, tlist->value);
+ if (gzprintf(outf, "%s:%s\n", tlist->key, tlist->value) < 1) {
+ gzclose(outf);
+ unlink(param->outfilename);
+ return NSERROR_NOSPACE;
+ }
tlist = tlist->next;
}
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]