krb5 commit: Fix EOF check in kadm5.acl line processing
Greg Hudson
ghudson at mit.edu
Thu Jan 14 11:38:53 EST 2016
https://github.com/krb5/krb5/commit/8fd85a77789496b8d7f8092f6e8a2824bc09a6cf
commit 8fd85a77789496b8d7f8092f6e8a2824bc09a6cf
Author: Robbie Harwood <rharwood at redhat.com>
Date: Wed Jan 13 18:17:09 2016 -0500
Fix EOF check in kadm5.acl line processing
On platforms where the char type is unsigned, the check for EOF (which
is negative) will always fail, leaving a 255 byte at the end of the
line. This can cause a syntax error, in turn causing the contents of
kadm5.acl to be ignored. Fix this bug by removing the cast on EOF.
[ghudson at mit.edu: more precisely describe consequences of bug in
commit message]
ticket: 8346 (new)
target_version: 1.14-next
target_version: 1.13-next
tags: pullup
src/lib/kadm5/srv/server_acl.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/lib/kadm5/srv/server_acl.c b/src/lib/kadm5/srv/server_acl.c
index bfeccfd..1fc60dc 100644
--- a/src/lib/kadm5/srv/server_acl.c
+++ b/src/lib/kadm5/srv/server_acl.c
@@ -115,7 +115,7 @@ kadm5int_acl_get_line(fp, lnp)
int byte;
byte = fgetc(fp);
acl_buf[i] = byte;
- if (byte == (char)EOF) {
+ if (byte == EOF) {
if (i > 0 && acl_buf[i-1] == '\\')
i--;
break; /* it gets nulled-out below */
More information about the cvs-krb5
mailing list