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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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]); 
Note: See TracChangeset for help on using the changeset viewer.