Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/20d46406ed0f5abbca57e13360bec4c17495c999
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/20d46406ed0f5abbca57e13360bec4c17495c999
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/20d46406ed0f5abbca57e13360bec4c17495c999

The branch, master has been updated
       via  20d46406ed0f5abbca57e13360bec4c17495c999 (commit)
      from  3ab21dbaa4ca855e757002ba1cf0c87da76cbd95 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=20d46406ed0f5abbca57e13360bec4c17495c999
commit 20d46406ed0f5abbca57e13360bec4c17495c999
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    about: Rework freeing the san_names structure
    
    AmiSSL's approach to replacing 90% of OpenSSL calls with assembly
    means that the official way to pop_free a stack type won't work.
    
    As such, we open-code it here.
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index b00e59d..d7c1f7e 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -972,7 +972,17 @@ static nserror san_to_info(X509 *cert, struct ns_cert_san 
**prev_next)
                        }
                }
        }
-       sk_GENERAL_NAME_pop_free(san_names, GENERAL_NAME_free);
+
+       /* AmiSSL can't cope with the "correct" mechanism of freeing
+        * the GENERAL_NAME stack, which is:
+        * sk_GENERAL_NAME_pop_free(san_names, GENERAL_NAME_free);
+        * So instead we do this open-coded loop which does the same:
+        */
+       for (idx = 0; idx < san_names_nb; idx++) {
+               GENERAL_NAME *entry = sk_GENERAL_NAME_pop(san_names);
+               GENERAL_NAME_free(entry);
+       }
+       sk_GENERAL_NAME_free(san_names);
 
        return NSERROR_OK;
 }


-----------------------------------------------------------------------

Summary of changes:
 content/fetchers/about.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index b00e59d..d7c1f7e 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -972,7 +972,17 @@ static nserror san_to_info(X509 *cert, struct ns_cert_san 
**prev_next)
                        }
                }
        }
-       sk_GENERAL_NAME_pop_free(san_names, GENERAL_NAME_free);
+
+       /* AmiSSL can't cope with the "correct" mechanism of freeing
+        * the GENERAL_NAME stack, which is:
+        * sk_GENERAL_NAME_pop_free(san_names, GENERAL_NAME_free);
+        * So instead we do this open-coded loop which does the same:
+        */
+       for (idx = 0; idx < san_names_nb; idx++) {
+               GENERAL_NAME *entry = sk_GENERAL_NAME_pop(san_names);
+               GENERAL_NAME_free(entry);
+       }
+       sk_GENERAL_NAME_free(san_names);
 
        return NSERROR_OK;
 }


-- 
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to