summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshish Gupta <ashmew2@gmail.com>2017-05-02 08:25:08 (GMT)
committer Ashish Gupta <ashmew2@gmail.com>2017-09-12 17:59:04 (GMT)
commitd7c6904c317bd9d636a38a8c02bb7cd8eacc9d01 (patch)
tree96d8bdd12b6a01fd042e57c9daf7d337d5e8c329
parentaa9550ce34a7f0ce3cc4d96cb4e7dd6611a2926d (diff)
downloadnetsurf-d7c6904c317bd9d636a38a8c02bb7cd8eacc9d01.tar.gz
netsurf-d7c6904c317bd9d636a38a8c02bb7cd8eacc9d01.tar.bz2
Properly initialize heap to avoid malloc failures
-rw-r--r--content/handlers/css/css.c2
-rw-r--r--frontends/kolibrios/Makefile4
-rw-r--r--frontends/kolibrios/fb/gui.c9
3 files changed, 8 insertions, 7 deletions
diff --git a/content/handlers/css/css.c b/content/handlers/css/css.c
index b6053a6..93efd6a 100644
--- a/content/handlers/css/css.c
+++ b/content/handlers/css/css.c
@@ -255,8 +255,6 @@ bool nscss_process_data(struct content *c, const char *data, unsigned int size)
content_broadcast_errorcode(c, NSERROR_CSS);
}
- debug_board_printf("Processing css_data of size : %u\n", size);
-
return (error == CSS_OK || error == CSS_NEEDDATA);
}
diff --git a/frontends/kolibrios/Makefile b/frontends/kolibrios/Makefile
index dcc5c93..f875ba1 100644
--- a/frontends/kolibrios/Makefile
+++ b/frontends/kolibrios/Makefile
@@ -129,8 +129,8 @@ $(warning $(foreach V,$(filter KOLIBRI_FONT_$(NETSURF_KOLIBRI_FONTLIB)_%,$(.VARI
# $(eval $(call pkg_config_find_and_add_enabled,MOZJS,mozjs185,JavaScript))
# $(eval $(call pkg_config_find_and_add_enabled,JS,mozilla-js,JavaScript))
-#S_KOLIBRIOS := main.c kolibri_misc.c kolibri_debug.c kolibri_filesystem.c kolibri_regex.c kolibri_http.c
-S_KOLIBRIOS :=
+#S_KOLIBRIOS := main.c kolibri_misc.c kolibri_debug.c kolibri_filesystem.c kolibri_regex.c
+S_KOLIBRIOS := kolibri_http.c
S_FRAMEBUFFER := gui.c framebuffer.c schedule.c bitmap.c fetch.c findfile.c localhistory.c clipboard.c
S_FRAMEBUFFER_FBTK := fbtk.c event.c fill.c bitmap.c user.c window.c text.c scroll.c osk.c
diff --git a/frontends/kolibrios/fb/gui.c b/frontends/kolibrios/fb/gui.c
index fbaf36f..d12bdfc 100644
--- a/frontends/kolibrios/fb/gui.c
+++ b/frontends/kolibrios/fb/gui.c
@@ -492,7 +492,7 @@ process_cmdline(int argc, char** argv)
/* Remove me! */
feurl = "http://www.kolibrios.org";
-
+
/* NS on KolibriOS does not support option parsing (yet) */
/* while((opt = getopt_long(argc, argv, "f:b:w:h:", */
@@ -2139,15 +2139,16 @@ MKARGV(ARGC, "\0");
char *respath = strdup(argv[0]);
for(int i = strlen(respath) - 1; i > 0; i--) {
if(respath[i] == '/') {
- strcpy((respath+i), "res");
+ strcpy((respath+i+1), "res");
break;
}
}
+ /* Skip the encoding bytes */
+ respath+=2;
ret = netsurf_register(&framebuffer_table);
if (ret != NSERROR_OK)
die("NetSurf operation table failed registration");
-
respaths = fb_init_resource(respath);
/* initialise logging. Abort on failure for KolibriOS. */
@@ -2160,6 +2161,8 @@ MKARGV(ARGC, "\0");
if (ret != NSERROR_OK)
die("Options failed to initialise");
+ LOG("Resources are at : %s", respath);
+
options = filepath_find(respaths, "Choices");
nsoption_read(options, nsoptions);
free(options);