From f1d1a653aaf1a9acde37b3d4e300e22566b41602 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 6 Aug 2008 16:43:04 +0000 Subject: [PATCH] Don't coerce fgetc value to char before EOF check git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20616 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kadm5/srv/server_acl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/kadm5/srv/server_acl.c b/src/lib/kadm5/srv/server_acl.c index 6cc9492c3..8eed476c8 100644 --- a/src/lib/kadm5/srv/server_acl.c +++ b/src/lib/kadm5/srv/server_acl.c @@ -115,8 +115,10 @@ kadm5int_acl_get_line(fp, lnp) for (domore = 1; domore && !feof(fp); ) { /* Copy in the line, with continuations */ for (i=0; ((i < sizeof acl_buf) && !feof(fp)); i++ ) { - acl_buf[i] = fgetc(fp); - if (acl_buf[i] == (char)EOF) { + int byte; + byte = fgetc(fp); + acl_buf[i] = byte; + if (byte == (char)EOF) { if (i > 0 && acl_buf[i-1] == '\\') i--; break; /* it gets nulled-out below */ -- 2.26.2