crypto/pkcs12/p12_utl.c:128: error: BUFFER_OVERRUN_L3
  Offset: [3, +oo] Size: [2, +oo].
Showing all 11 steps of the trace


crypto/pkcs12/p12_utl.c:80:10: <Length trace>
78.           asclen = strlen(asc);
79.   
80.       for (ulen = 0, i = 0; i < asclen; i += j) {
               ^
81.           j = UTF8_getc((const unsigned char *)asc+i, asclen-i, &utf32chr);
82.   

crypto/pkcs12/p12_utl.c:80:10: Assignment
78.           asclen = strlen(asc);
79.   
80.       for (ulen = 0, i = 0; i < asclen; i += j) {
               ^
81.           j = UTF8_getc((const unsigned char *)asc+i, asclen-i, &utf32chr);
82.   

crypto/pkcs12/p12_utl.c:111:5: Assignment
109.       }
110.   
111.       ulen += 2;  /* for trailing UTF16 zero */
           ^
112.   
113.       if ((ret = OPENSSL_malloc(ulen)) == NULL)

crypto/pkcs12/p12_utl.c:113:16: Call
111.       ulen += 2;  /* for trailing UTF16 zero */
112.   
113.       if ((ret = OPENSSL_malloc(ulen)) == NULL)
                      ^
114.           return NULL;
115.   

crypto/mem.c:166:9: Assignment
  164.   
  165.       if (num == 0)
  166.           return NULL;
                 ^
  167.   
  168.       FAILTEST();

crypto/pkcs12/p12_utl.c:113:10: Assignment
111.       ulen += 2;  /* for trailing UTF16 zero */
112.   
113.       if ((ret = OPENSSL_malloc(ulen)) == NULL)
                ^
114.           return NULL;
115.   

crypto/pkcs12/p12_utl.c:117:10: Assignment
115.   
116.       /* re-run the loop writing down UTF-16 characters in big-endian order */
117.       for (unitmp = ret, i = 0; i < asclen; i += j) {
                ^
118.           j = UTF8_getc((const unsigned char *)asc+i, asclen-i, &utf32chr);
119.           if (utf32chr >= 0x10000) {      /* pair if UTF-16 characters */

crypto/pkcs12/p12_utl.c:125:14: Assignment
123.               hi = 0xD800 + (utf32chr>>10);
124.               lo = 0xDC00 + (utf32chr&0x3ff);
125.               *unitmp++ = (unsigned char)(hi>>8);
                    ^
126.               *unitmp++ = (unsigned char)(hi);
127.               *unitmp++ = (unsigned char)(lo>>8);

crypto/pkcs12/p12_utl.c:126:14: Assignment
124.               lo = 0xDC00 + (utf32chr&0x3ff);
125.               *unitmp++ = (unsigned char)(hi>>8);
126.               *unitmp++ = (unsigned char)(hi);
                    ^
127.               *unitmp++ = (unsigned char)(lo>>8);
128.               *unitmp++ = (unsigned char)(lo);

crypto/pkcs12/p12_utl.c:127:14: Assignment
125.               *unitmp++ = (unsigned char)(hi>>8);
126.               *unitmp++ = (unsigned char)(hi);
127.               *unitmp++ = (unsigned char)(lo>>8);
                    ^
128.               *unitmp++ = (unsigned char)(lo);
129.           } else {                        /* or just one */

crypto/pkcs12/p12_utl.c:128:13: Array access: Offset: [3, +oo] Size: [2, +oo]
126.               *unitmp++ = (unsigned char)(hi);
127.               *unitmp++ = (unsigned char)(lo>>8);
128.               *unitmp++ = (unsigned char)(lo);
                   ^
129.           } else {                        /* or just one */
130.               *unitmp++ = (unsigned char)(utf32chr>>8);
