RE: valgrind complaints about my network data received through ssl

2008-02-29 Thread David Schwartz
Let's start with the obvious, just to make 100% sure we're really having an issue here. Here is one code example where I'm reading a 10-byte block of data (always 10-bytes, not less): bufptr = (u_char *)wh; for (nread = 0; nread sizeof(wh); nread += ret) { ret =

Re: valgrind complaints about my network data received through ssl

2008-02-29 Thread Bobby Krupczak
Hi! Here is one code example where I'm reading a 10-byte block of data (always 10-bytes, not less): bufptr = (u_char *)wh; for (nread = 0; nread sizeof(wh); nread += ret) { ret = SSL_read(ssl,bufptr+nread,sizeof(wh)-nread); if (ret = 0) break;

Re: valgrind complaints about my network data received through ssl

2008-02-28 Thread Rick Jones
Bobby Krupczak wrote: Hi! I've written a network app using pthreads, ssl, and xml. I use xml over tcp over ssl and all of that is working fine. Whilest chasing down what I thought was a bug, I started using valgrind on my app. I'm receiving thousands of uninitialized value and conditional

Re: valgrind complaints about my network data received through ssl

2008-02-28 Thread Michael S. Zick
On Thu February 28 2008 17:52, David Schwartz wrote: I've written a network app using pthreads, ssl, and xml. I use xml over tcp over ssl and all of that is working fine. Whilest chasing down what I thought was a bug, I started using valgrind on my app. I'm receiving thousands of

RE: valgrind complaints about my network data received through ssl

2008-02-28 Thread David Schwartz
Consider: char buf[1024]; int i, j; buf[1024]=0; // to make sure we don't run off the end Does not C number the indices: 0..1023? Yeah, that's what I get for hastily constructing an example. DS __ OpenSSL

Re: valgrind complaints about my network data received through ssl

2008-02-28 Thread Bobby Krupczak
Hi! So, I'm struggling to understand why the data received via sockets from the network and through SSL would trigger these kinds of warnings. Literally, every packet/pdu I receive and parse triggers these errors. The data is valid and the PDUs are correct thus my confusion. Has anyone

Re: valgrind complaints about my network data received through ssl

2008-02-28 Thread Bobby Krupczak
Hi! So, I'm struggling to understand why the data received via sockets from the network and through SSL would trigger these kinds of warnings. Literally, every packet/pdu I receive and parse triggers these errors. The data is valid and the PDUs are correct thus my confusion. Has