Ignore:
Timestamp:
Oct 11, 2019 2:26:12 PM (5 years 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_ossl.c

    r6079 r6091  
    17101710    chain = SSL_get_peer_cert_chain(ossock->ossl_ssl); 
    17111711    if (chain) { 
    1712        ssl_update_remote_cert_chain_info(ssock->pool, 
    1713                                          &ssock->remote_cert_info, 
    1714                                          chain, PJ_TRUE); 
     1712        pj_pool_reset(ssock->info_pool); 
     1713        ssl_update_remote_cert_chain_info(ssock->info_pool, 
     1714                                          &ssock->remote_cert_info, 
     1715                                          chain, PJ_TRUE); 
    17151716    } else { 
    1716        ssock->remote_cert_info.raw_chain.cnt = 0; 
     1717        ssock->remote_cert_info.raw_chain.cnt = 0; 
    17171718    } 
    17181719} 
Note: See TracChangeset for help on using the changeset viewer.