mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-16 14:34:53 +03:00
It helps to allocate enough memory for 40 LONGs, and that memory needs to be returned
regardless as passing a NULL to chooser.gadget crashes it. svn path=/trunk/netsurf/; revision=9757
This commit is contained in:
parent
a3d82a3634
commit
f23a285103
@ -1748,12 +1748,12 @@ STRPTR *ami_gui_opts_websearch(void)
|
||||
ULONG ref = 0;
|
||||
STRPTR *websearchlist;
|
||||
|
||||
if (option_search_engines_file == NULL) return NULL;
|
||||
websearchlist = AllocVec(200, MEMF_CLEAR);
|
||||
|
||||
if (option_search_engines_file == NULL) return websearchlist;
|
||||
|
||||
FILE *f = fopen(option_search_engines_file, "r");
|
||||
if (f == NULL) return NULL;
|
||||
|
||||
websearchlist = AllocVec(40, MEMF_CLEAR);
|
||||
if (f == NULL) return websearchlist;
|
||||
|
||||
while (fgets(buf, sizeof(buf), f) != NULL) {
|
||||
if (buf[0] == '\0') continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user