Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!mailrus!purdue!decwrl!shlump.nac.dec.com!decuac!hadron!jsdy
From: jsdy@hadron.UUCP (Joseph S. D. Yao)
Newsgroups: comp.std.c
Subject: Re: ANSI C, hardware protection, out-of-bounds pointers
Keywords: ANSI C, hardware protection, out-of-bounds pointers
Message-ID: <867@hadron.UUCP>
Date: 7 Sep 89 03:45:27 GMT
References: <427@maytag.waterloo.edu>
Reply-To: jsdy@hadron.UUCP (Joseph S. D. Yao)
Organization: Hadron, Inc., Fairfax, VA
Lines: 16
In article <427@maytag.waterloo.edu> lhf@aries5 (Luiz H. deFigueiredo) writes:
-ANSI C says that is *is* legal to use mention (but not dereference) a pointer
-just out-of-bounds as in
-
- char a[N];
- char *last=a+N; /* Here! */
- char *p;
- for (p=a; phead; p--)
This, too, is an out-of-bounds pointer, and is covered by the same
rule. Nothing says that an OOB ptr has to be positively offset.
joe yao