summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2016-06-15 21:00:24 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2016-06-15 21:00:24 +0100
commite7d8f550c4c6b36edeb7d05ea065979b9f9fd468 (patch)
treeaf79d9f08f434fd308b97cabfbdc31e8665b971a
parentbb9f91153bea94c2b54df9cb8476f4afa4911782 (diff)
downloadnetsurf-chris/fortify.tar.gz
Attempt to fortify more files to catch alloc/free split between core and frontendchris/fortify
-rw-r--r--content/fetch.c2
-rw-r--r--content/fetchers.h2
-rw-r--r--content/fetchers/about.c2
-rw-r--r--content/fetchers/curl.c2
-rw-r--r--content/fetchers/data.c2
-rw-r--r--content/fetchers/file.c2
-rw-r--r--content/fetchers/resource.c2
-rw-r--r--content/handlers/javascript/fetcher.c2
-rw-r--r--frontends/amiga/filetype.c2
-rw-r--r--frontends/amiga/gui.c2
-rw-r--r--frontends/amiga/options.h2
-rwxr-xr-xfrontends/amiga/utf8.c2
-rw-r--r--render/html_css_fetcher.c2
13 files changed, 14 insertions, 12 deletions
diff --git a/content/fetch.c b/content/fetch.c
index c5928ba85..5c8769bd7 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -587,7 +587,7 @@ void fetch_free(struct fetch *f)
{
FETCH_LOG("Freeing fetch %p, fetcher %p", f, f->fetcher_handle);
- fetchers[f->fetcherd].ops.free(f->fetcher_handle);
+ fetchers[f->fetcherd].ops.ffree(f->fetcher_handle);
fetch_unref_fetcher(f->fetcherd);
diff --git a/content/fetchers.h b/content/fetchers.h
index 92b11dc69..e58d87305 100644
--- a/content/fetchers.h
+++ b/content/fetchers.h
@@ -83,7 +83,7 @@ struct fetcher_operation_table {
/**
* free a fetch allocated through the setup method.
*/
- void (*free)(void *fetch);
+ void (*ffree)(void *fetch);
/**
* poll a fetcher to let it make progress.
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index 4d14020b0..76985a76e 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -853,7 +853,7 @@ nserror fetch_about_register(void)
.setup = fetch_about_setup,
.start = fetch_about_start,
.abort = fetch_about_abort,
- .free = fetch_about_free,
+ .ffree = fetch_about_free,
.poll = fetch_about_poll,
.finalise = fetch_about_finalise
};
diff --git a/content/fetchers/curl.c b/content/fetchers/curl.c
index 9ac390c6c..d242bedc5 100644
--- a/content/fetchers/curl.c
+++ b/content/fetchers/curl.c
@@ -1282,7 +1282,7 @@ nserror fetch_curl_register(void)
.setup = fetch_curl_setup,
.start = fetch_curl_start,
.abort = fetch_curl_abort,
- .free = fetch_curl_free,
+ .ffree = fetch_curl_free,
.poll = fetch_curl_poll,
.finalise = fetch_curl_finalise
};
diff --git a/content/fetchers/data.c b/content/fetchers/data.c
index 84d0aa3fa..7302f9d7c 100644
--- a/content/fetchers/data.c
+++ b/content/fetchers/data.c
@@ -327,7 +327,7 @@ nserror fetch_data_register(void)
.setup = fetch_data_setup,
.start = fetch_data_start,
.abort = fetch_data_abort,
- .free = fetch_data_free,
+ .ffree = fetch_data_free,
.poll = fetch_data_poll,
.finalise = fetch_data_finalise
};
diff --git a/content/fetchers/file.c b/content/fetchers/file.c
index 04184d27a..8c145df2e 100644
--- a/content/fetchers/file.c
+++ b/content/fetchers/file.c
@@ -822,7 +822,7 @@ nserror fetch_file_register(void)
.setup = fetch_file_setup,
.start = fetch_file_start,
.abort = fetch_file_abort,
- .free = fetch_file_free,
+ .ffree = fetch_file_free,
.poll = fetch_file_poll,
.finalise = fetch_file_finalise
};
diff --git a/content/fetchers/resource.c b/content/fetchers/resource.c
index 21ad8c746..8626942ca 100644
--- a/content/fetchers/resource.c
+++ b/content/fetchers/resource.c
@@ -461,7 +461,7 @@ nserror fetch_resource_register(void)
.setup = fetch_resource_setup,
.start = fetch_resource_start,
.abort = fetch_resource_abort,
- .free = fetch_resource_free,
+ .ffree = fetch_resource_free,
.poll = fetch_resource_poll,
.finalise = fetch_resource_finalise
};
diff --git a/content/handlers/javascript/fetcher.c b/content/handlers/javascript/fetcher.c
index 839df265a..80a53d809 100644
--- a/content/handlers/javascript/fetcher.c
+++ b/content/handlers/javascript/fetcher.c
@@ -208,7 +208,7 @@ nserror fetch_javascript_register(void)
.setup = fetch_javascript_setup,
.start = fetch_javascript_start,
.abort = fetch_javascript_abort,
- .free = fetch_javascript_free,
+ .ffree = fetch_javascript_free,
.poll = fetch_javascript_poll,
.finalise = fetch_javascript_finalise
};
diff --git a/frontends/amiga/filetype.c b/frontends/amiga/filetype.c
index 05f130e66..61e4929c5 100644
--- a/frontends/amiga/filetype.c
+++ b/frontends/amiga/filetype.c
@@ -352,7 +352,7 @@ static APTR ami_mime_guess_add_datatype(struct DataType *dt, lwc_string **lwc_mi
{
struct nsObject *node;
char mimetype[100];
- char *dt_name_lwr;
+ char *dt_name_lwr = NULL;
struct ami_mime_entry *mimeentry;
lwc_error lerror;
struct DataTypeHeader *dth = dt->dtn_Header;
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index afb49a574..07c7214e3 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -334,7 +334,7 @@ bool ami_gui_map_filename(char **remapped, const char *path, const char *file, c
static bool ami_gui_check_resource(char *fullpath, const char *file)
{
bool found = false;
- char *remapped;
+ char *remapped = NULL;
BPTR lock = 0;
size_t fullpath_len = 1024;
diff --git a/frontends/amiga/options.h b/frontends/amiga/options.h
index 39e62dc10..ef6442517 100644
--- a/frontends/amiga/options.h
+++ b/frontends/amiga/options.h
@@ -20,7 +20,7 @@
#define AMIGA_OPTIONS_H
/* currently nothing here */
-
+#include "frontends/amiga/fortify/fortify.h"
#endif
diff --git a/frontends/amiga/utf8.c b/frontends/amiga/utf8.c
index 24af8c8b9..1e34b002a 100755
--- a/frontends/amiga/utf8.c
+++ b/frontends/amiga/utf8.c
@@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "amiga/os3support.h"
+
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
diff --git a/render/html_css_fetcher.c b/render/html_css_fetcher.c
index 05aef0227..ac312a72d 100644
--- a/render/html_css_fetcher.c
+++ b/render/html_css_fetcher.c
@@ -283,7 +283,7 @@ nserror html_css_fetcher_register(void)
.setup = html_css_fetcher_setup,
.start = html_css_fetcher_start,
.abort = html_css_fetcher_abort,
- .free = html_css_fetcher_free,
+ .ffree = html_css_fetcher_free,
.poll = html_css_fetcher_poll,
.finalise = html_css_fetcher_finalise
};