DragonFly commits List (threaded) for 2005-07
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
cvs commit: src/include ctype.h src/lib/libc/gen isctype.c tolower.c toupper.c
dillon 2005/07/07 00:17:47 PDT
DragonFly src repository
Modified files:
include ctype.h
lib/libc/gen isctype.c tolower.c toupper.c
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).
Revision Changes Path
1.14 +46 -24 src/include/ctype.h
1.5 +12 -12 src/lib/libc/gen/isctype.c
1.2 +1 -1 src/lib/libc/gen/tolower.c
1.2 +1 -1 src/lib/libc/gen/toupper.c
http://www.dragonflybsd.org/cvsweb/src/include/ctype.h.diff?r1=1.13&r2=1.14&f=u
http://www.dragonflybsd.org/cvsweb/src/lib/libc/gen/isctype.c.diff?r1=1.4&r2=1.5&f=u
http://www.dragonflybsd.org/cvsweb/src/lib/libc/gen/tolower.c.diff?r1=1.1&r2=1.2&f=u
http://www.dragonflybsd.org/cvsweb/src/lib/libc/gen/toupper.c.diff?r1=1.1&r2=1.2&f=u
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]