delorie.com/archives/browse.cgi | search |
Date: | Sun, 22 Jun 1997 12:04:38 +0300 (IDT) |
From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
To: | Nate Eldredge <eldredge AT ap DOT net> |
cc: | djgpp AT delorie DOT com |
Subject: | Re: Possible misbehavior of write |
In-Reply-To: | <199706192159.OAA27333@adit.ap.net> |
Message-ID: | <Pine.SUN.3.91.970622120409.4249A-100000@is> |
MIME-Version: | 1.0 |
On Thu, 19 Jun 1997, Nate Eldredge wrote: > Egad! I had a look at the sources and it seems it would require changing > alomst every function that takes a pointer argument. Plus, is it to check > just for NULL's, or decide whether it's a valid address some other way? You could check if the pointer is in the first page, like so: if (! (ptr & ~4095) ) errno = EFAULT; since the CWSDPMI's null pointer detection actually tests for this also.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |