delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1997/06/19/07:04:12

Date: Thu, 19 Jun 1997 07:01:38 -0400 (EDT)
Message-Id: <199706191101.HAA29378@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: sandmann AT clio DOT rice DOT edu
CC: djgpp-workers AT delorie DOT com
In-reply-to: <33a8638f.sandmann@clio.rice.edu>
Subject: Re: Possible misbehavior of write

> So - is it worth it?

I think checking for pointers in the 0..4095 range would be worth it,
but trying to handle all those other cases would be too much overhead,
considering how long it's taken for it to become an issue.

write(int fd, const void *buf, int count)
{
  if (count == 0)
    return 0;
  if (!(ptr & ~4095))
  {
    errno = EFAULT;
    return -1;
  }

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019