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-06-10 06:25:29 (GMT)
commit9d8b0eae94a77f2099ae873741efa2a6f9b78a57 (patch)
tree28331dcf93f78b9810dbf83d541a0e547e362f19
parentfd16a63ad237e4bb4431bf78a5fcb80274131a92 (diff)
downloadnetsurf-9d8b0eae94a77f2099ae873741efa2a6f9b78a57.tar.gz
netsurf-9d8b0eae94a77f2099ae873741efa2a6f9b78a57.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 ffff14f..997eb51 100644
--- a/content/handlers/css/css.c
+++ b/content/handlers/css/css.c
@@ -259,8 +259,6 @@ bool nscss_process_data(struct content *c, const char *data, unsigned int size)
content_broadcast(c, CONTENT_MSG_ERROR, msg_data);
}
- 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);