Ensure argument to isdigit() is within valid range by "&"ing with 0xff.

This commit is contained in:
David Lawrence 2000-08-03 13:44:02 +00:00
parent 3fe99b84d6
commit 450e48205f

View file

@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: dir.c,v 1.13 2000/08/01 01:31:12 tale Exp $ */
/* $Id: dir.c,v 1.14 2000/08/03 13:44:02 tale Exp $ */
/* Principal Authors: DCL */
@ -179,7 +179,7 @@ isc_dir_createunique(char *templet) {
*/
p = x;
while (*p != '\0') {
if (isdigit(*p))
if (isdigit(*p & 0xff))
*p = 'a';
else if (*p != 'z')
++*p;