Changeset 929d313 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:
421ef1c
Parents:
480aba1
git-author:
Daniel Kahn Gillmor <dkg@…> (01/28/13 20:31:32)
git-committer:
Daniel Kahn Gillmor <dkg@…> (01/29/13 20:05:42)
Message:

avoid use-after-free in mgs_set_key_file()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_config.c

    r480aba1 r929d313  
    131131    const char *file;
    132132    apr_pool_t *spool;
     133    const char *out;
    133134
    134135        mgs_srvconf_rec *sc = (mgs_srvconf_rec *) ap_get_module_config(parms->server->module_config, &gnutls_module);
     
    139140
    140141    if (load_datum_from_file(spool, file, &data) != 0) {
     142        out = apr_psprintf(parms->pool, "GnuTLS: Error Reading Private Key '%s'", file);
    141143                apr_pool_destroy(spool);
    142         return apr_psprintf(parms->pool, "GnuTLS: Error Reading Private Key '%s'", file);
     144        return out;
    143145    }
    144146
     
    157159
    158160    if (ret < 0) {
     161        out = apr_psprintf(parms->pool, "GnuTLS: Failed to Import Private Key '%s': (%d) %s", file, ret, gnutls_strerror(ret));
    159162                apr_pool_destroy(spool);
    160         return apr_psprintf(parms->pool, "GnuTLS: Failed to Import Private Key '%s': (%d) %s", file, ret, gnutls_strerror(ret));
     163        return out;
    161164    }
    162165
Note: See TracChangeset for help on using the changeset viewer.