Ignore:
Timestamp:
Oct 11, 2019 2:26:12 PM (13 months ago)
Author:
riza
Message:

Fix #2244: Prevent continuous memory allocation when getting raw certificate on TLS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ssl_sock_gtls.c

    r5938 r6091  
    10511051 
    10521052    tls_cert_get_info(ssock->pool, &ssock->local_cert_info, cert); 
    1053     tls_cert_get_chain_raw(ssock->pool, &ssock->local_cert_info, us, 1); 
     1053    pj_pool_reset(ssock->info_pool); 
     1054    tls_cert_get_chain_raw(ssock->info_pool, &ssock->local_cert_info, us, 1); 
    10541055 
    10551056us_out: 
     
    10781079 
    10791080    tls_cert_get_info(ssock->pool, &ssock->remote_cert_info, cert); 
    1080     tls_cert_get_chain_raw(ssock->pool, &ssock->remote_cert_info, certs, 
     1081    pj_pool_reset(ssock->info_pool); 
     1082    tls_cert_get_chain_raw(ssock->info_pool, &ssock->remote_cert_info, certs, 
    10811083                           certslen); 
    10821084 
Note: See TracChangeset for help on using the changeset viewer.