Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/63dd59bd2e8327091d2a57e4f4c7e5b2378eb2ce
...commit
http://git.netsurf-browser.org/netsurf.git/commit/63dd59bd2e8327091d2a57e4f4c7e5b2378eb2ce
...tree
http://git.netsurf-browser.org/netsurf.git/tree/63dd59bd2e8327091d2a57e4f4c7e5b2378eb2ce
The branch, master has been updated
via 63dd59bd2e8327091d2a57e4f4c7e5b2378eb2ce (commit)
from b8dc537bf82637d223332a6fa2ab95064acd63ee (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=63dd59bd2e8327091d2a57e4f4c7e5b2378eb2ce
commit 63dd59bd2e8327091d2a57e4f4c7e5b2378eb2ce
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Cache backing store: Add missing calloc check.
Found by coverity:
CID 1419831: Null pointer dereferences (NULL_RETURNS)
>>> Dereferencing a pointer that might be "NULL" "url" when calling
"read".
diff --git a/content/fs_backing_store.c b/content/fs_backing_store.c
index 272f251..481519d 100644
--- a/content/fs_backing_store.c
+++ b/content/fs_backing_store.c
@@ -1159,6 +1159,11 @@ read_entries(struct store_state *state)
uint32_t urllen;
while (read(fd, &urllen, sizeof(urllen)) == sizeof(urllen)) {
url = calloc(1, urllen+1);
+ if (url == NULL) {
+ close(fd);
+ free(fname);
+ return NSERROR_NOMEM;
+ }
if (read(fd, url, urllen) != urllen) {
free(url);
close(fd);
-----------------------------------------------------------------------
Summary of changes:
content/fs_backing_store.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/content/fs_backing_store.c b/content/fs_backing_store.c
index 272f251..481519d 100644
--- a/content/fs_backing_store.c
+++ b/content/fs_backing_store.c
@@ -1159,6 +1159,11 @@ read_entries(struct store_state *state)
uint32_t urllen;
while (read(fd, &urllen, sizeof(urllen)) == sizeof(urllen)) {
url = calloc(1, urllen+1);
+ if (url == NULL) {
+ close(fd);
+ free(fname);
+ return NSERROR_NOMEM;
+ }
if (read(fd, url, urllen) != urllen) {
free(url);
close(fd);
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org