cvs commit: src/include ctype.h src/lib/libc/gen isctype.c tolower.c toupper.c

Matthew Dillon dillon at apollo.backplane.com
Thu Jul 7 10:36:51 PDT 2005


:..
:>   Log:
:>   It is not acceptable to index the array out of bounds if an illegal index
:>   is passed to a ctype function or macro.  Undo the last commit.  Emplace an
:>   explicit range check for the integer passed to the ctype macros and
:>   functions rather then underflowing or overflowing the array.  Currently
:>   return 0 if the integer is out of range (it might be more appropriate to
:>   assert).
:
:It is definately more appropriate to assert IMO.
:
:-Chris

    Well, it's hard to say.  If the standard said we should assert, then
    we should assert.  But the programmer might not have the expectation  
    of an is*() call *EVER* causing the program to exit.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Commits mailing list