rendered paste body 128 ssize_t ssl_readn(SSL *ssl, char *vptr, size_t n) {
129 ssize_t nread = 0;
130
131 while(1) {
132 if ((nread = SSL_read(ssl, vptr, n)) < 0) {
133 switch (SSL_get_error(ssl, nread)) {
134 case SSL_ERROR_WANT_READ:
135 break;
136 default:
137 errno = ECONNRESET;
138 return -1;
139 }
140 } else
141 break;
142 }
143 fprintf(stderr, "Nread is %i\n", nread);
144
145
146 vptr[nread] = '\0';
147 return nread;
148 }
==2713== Use of uninitialised value of size 4
==2713== at 0x40A25FF: vfprintf (in /lib/libc-2.3.2.so)
==2713== by 0x40A504D: buffered_vfprintf (in /lib/libc-2.3.2.so)
==2713== by 0x40A4A9A: vfprintf (in /lib/libc-2.3.2.so)
==2713== by 0x40AAF6E: fprintf (in /lib/libc-2.3.2.so)
==2713== by 0x804E52E: ssl_readn (ssl.c:143)
==2713== by 0x804F91C: main (main.c:414)