Changeset c0dd3ab in mod_gnutls


Ignore:
Timestamp:
Jan 29, 2013, 8:05:42 PM (7 years ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, debian/stretch-backports, jessie-backports, master, msva, upstream
Children:
25e6b32
Parents:
f9eab65
git-author:
Daniel Kahn Gillmor <dkg@…> (01/29/13 15:52:31)
git-committer:
Daniel Kahn Gillmor <dkg@…> (01/29/13 20:05:42)
Message:

avoid invoking gnutls_transport_get_ptr on a NULL session

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_hooks.c

    rf9eab65 rc0dd3ab  
    151151        _gnutls_log(debug_log_fp, "%s: %d\n", __func__, __LINE__);
    152152
    153         mgs_handle_t *ctxt = gnutls_transport_get_ptr(session);
     153        mgs_handle_t *ctxt;
    154154
    155155    if (session == NULL) {
     
    158158                ret->deinit_all = 1;
    159159        return -1;
    160         } else if (gnutls_certificate_type_get(session) == GNUTLS_CRT_X509) {
     160        }
     161    ctxt = gnutls_transport_get_ptr(session);
     162
     163    if (gnutls_certificate_type_get(session) == GNUTLS_CRT_X509) {
    161164                // X509 CERTIFICATE
    162165                ret->cert_type = GNUTLS_CRT_X509;
Note: See TracChangeset for help on using the changeset viewer.