~ubuntu-branches/debian/stretch/haproxy/stretch

« back to all changes in this revision

Viewing changes to src/connection.c

  • Committer: Package Import Robot
  • Author(s): Apollon Oikonomopoulos
  • Date: 2014-07-25 10:41:36 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20140725104136-pasatnu64np969n0
Tags: 1.5.3-1
* New upstream stable release, fixing the following issues:
  + Memory corruption when building a proxy protocol v2 header
  + Memory leak in SSL DHE key exchange

Show diffs side-by-side

added added

removed removed

Lines of Context:
622
622
        char *value = NULL;
623
623
        struct tlv_ssl *tlv;
624
624
        int ssl_tlv_len = 0;
 
625
        struct chunk *cn_trash;
625
626
#endif
626
627
 
627
628
        if (buf_len < PP2_HEADER_LEN)
682
683
                                tlv->verify = htonl(ssl_sock_get_verify_result(remote));
683
684
                        }
684
685
                        if (srv->pp_opts & SRV_PP_V2_SSL_CN) {
685
 
                                if (ssl_sock_get_remote_common_name(remote, &trash) > 0) {
686
 
                                        tlv_len = make_tlv(&buf[ret+ssl_tlv_len], (buf_len - ret - ssl_tlv_len), PP2_TYPE_SSL_CN, trash.len, trash.str);
 
686
                                cn_trash = get_trash_chunk();
 
687
                                if (ssl_sock_get_remote_common_name(remote, cn_trash) > 0) {
 
688
                                        tlv_len = make_tlv(&buf[ret+ssl_tlv_len], (buf_len - ret - ssl_tlv_len), PP2_TYPE_SSL_CN, cn_trash->len, cn_trash->str);
687
689
                                        ssl_tlv_len += tlv_len;
688
690
                                }
689
691
                        }