diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-01-26 19:40:59 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-01-26 19:40:59 +0000 |
commit | 04cbc08c5726556e2a7c4b565d3cc933bac7b9bd (patch) | |
tree | 9bcde4485c76765600828c20345f991ecad2c4a4 /amiga/launch.c | |
parent | 520e81f98d7560cb39a9141c698723e2e36aa675 (diff) | |
download | netsurf-04cbc08c5726556e2a7c4b565d3cc933bac7b9bd.tar.gz netsurf-04cbc08c5726556e2a7c4b565d3cc933bac7b9bd.tar.bz2 |
Don't use ami_NewMinList as it potentially writes past the MinList structure on OS3.
Instead we use ami_AllocMinList and pointers.
Diffstat (limited to 'amiga/launch.c')
-rwxr-xr-x | amiga/launch.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/amiga/launch.c b/amiga/launch.c index 9ac1c5b5f..1f2b9e16c 100755 --- a/amiga/launch.c +++ b/amiga/launch.c @@ -38,7 +38,7 @@ struct Library *OpenURLBase = NULL; struct OpenURLIFace *IOpenURL = NULL; -struct MinList ami_unsupportedprotocols; +struct MinList *ami_unsupportedprotocols; struct ami_protocol { @@ -65,7 +65,7 @@ static struct ami_protocol *ami_openurl_add_protocol(const char *url) return NULL; } - AddTail((struct List *)&ami_unsupportedprotocols, (struct Node *)ami_p); + AddTail((struct List *)ami_unsupportedprotocols, (struct Node *)ami_p); return ami_p; } @@ -86,6 +86,8 @@ static void ami_openurl_free_list(struct MinList *list) FreeVec(node); node = NULL; }while((node=nnode)); + + FreeVec(list); } static BOOL ami_openurl_check_list(struct MinList *list, nsurl *url) @@ -132,7 +134,7 @@ void ami_openurl_open(void) } } - ami_NewMinList(&ami_unsupportedprotocols); + ami_unsupportedprotocols = ami_AllocMinList(); } void ami_openurl_close(void) @@ -142,7 +144,7 @@ void ami_openurl_close(void) #endif if(OpenURLBase) CloseLibrary(OpenURLBase); - ami_openurl_free_list(&ami_unsupportedprotocols); + ami_openurl_free_list(ami_unsupportedprotocols); } nserror gui_launch_url(struct nsurl *url) @@ -152,7 +154,7 @@ nserror gui_launch_url(struct nsurl *url) #endif char *launchurl = NULL; - if(ami_openurl_check_list(&ami_unsupportedprotocols, url) == FALSE) + if(ami_openurl_check_list(ami_unsupportedprotocols, url) == FALSE) { if(IOpenURL) { |