Changeset 5929 for pjproject


Ignore:
Timestamp:
Jan 9, 2019 9:15:11 AM (7 months ago)
Author:
riza
Message:

Close #2174: Fix out of bound error when enabling GnuTLS.

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/build/pjlib.vcxproj

    r5709 r5929  
    753753    <ClCompile Include="..\src\pj\ssl_sock_dump.c" /> 
    754754    <ClCompile Include="..\src\pj\ssl_sock_ossl.c" /> 
     755    <ClCompile Include="..\src\pj\ssl_sock_gtls.c" /> 
    755756    <ClCompile Include="..\src\pj\string.c" /> 
    756757    <ClCompile Include="..\src\pj\symbols.c"> 
  • pjproject/trunk/pjlib/src/pj/ssl_sock_gtls.c

    r5821 r5929  
    494494        unsigned int i; 
    495495 
    496         for (i = 0; ; i++) { 
     496        for (i = 0; i<PJ_ARRAY_SIZE(tls_ciphers); i++) { 
    497497            unsigned char id[2]; 
    498498            const char *suite; 
     
    504504             * ciphers anyway, so by checking here we can exit the loop as soon 
    505505             * as either all ciphers have been added or the array is full */ 
    506             if (suite && i < PJ_ARRAY_SIZE(tls_ciphers)) { 
     506            if (suite) { 
    507507                tls_ciphers[i].id = (pj_ssl_cipher) 
    508508                    (pj_uint32_t) ((id[0] << 8) | id[1]); 
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp_sdes.c

    r5860 r5929  
    2121 
    2222/* Include OpenSSL libraries for MSVC */ 
    23 #  ifdef _MSC_VER 
    24 #    if OPENSSL_VERSION_NUMBER >= 0x10100000L 
    25 #      pragma comment(lib, "libcrypto") 
    26 #    else 
    27 #      pragma comment(lib, "libeay32") 
    28 #      pragma comment(lib, "ssleay32") 
     23#  ifdef _MSC_VER  
     24#    if (PJ_SSL_SOCK_IMP == PJ_SSL_SOCK_IMP_OPENSSL) 
     25#      if OPENSSL_VERSION_NUMBER >= 0x10100000L 
     26#        pragma comment(lib, "libcrypto") 
     27#      else 
     28#        pragma comment(lib, "libeay32") 
     29#        pragma comment(lib, "ssleay32") 
     30#      endif 
    2931#    endif 
    3032#  endif 
    31  
    3233#endif 
    3334 
Note: See TracChangeset for help on using the changeset viewer.