Memory corruption after AXFER
Cody.Gibson at intermec.com
Cody.Gibson at intermec.com
Fri Feb 4 17:09:01 UTC 2000
I wish it were true on OS/2. But there's no const specified anywhere in the
OS/2 documentation of the TCP stack:
#include <types.h>
#include <sys\socket.h>
int readv(s, iov, iovcnt)
int s;
struct iovec *iov;
int iovcnt;
Cody
-----Original Message-----
From: LaMont Jones [mailto:lamont at security.hp.com]
Sent: Thursday, February 03, 2000 7:09 PM
To: Cody.Gibson at intermec.com
Cc: bind-workers at isc.org; lamont at security.hp.com
Subject: Re: Memory corruption after AXFER
> I found the source of the problem. Turned out to be a subtle difference in
> the way that readv() and writev() function under OS/2. The BIND functions
> readable() and writeable() [contained in ev_streams.c] ASSUME that the iov
> array will be left intact as originally passed in to readv() and writev().
> The problem is that under OS/2, the iov array is ALREADY updated by the
> readv() and writev() functions before they return to the caller...
The man pages on my system (I'm to lazy to dig up the Posix spec, but it
should match...) claim that iov is a const - the function can't change it.
Of course, just because it's a standard doesn't mean that you don't have
to change your code... :-(
Sigh,
lamont
More information about the bind-workers
mailing list