svn rev #21892: trunk/src/lib/krb5/keytab/
ghudson@MIT.EDU
ghudson at MIT.EDU
Thu Feb 5 13:34:58 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=21892
Commit By: ghudson
Log Message:
In krb5_ktfileint_find_slot, check for an error return from ftell.
(Such an error will never happen in any reasonable stdio
implementation but it's more correct to check.)
Changed Files:
U trunk/src/lib/krb5/keytab/kt_file.c
Modified: trunk/src/lib/krb5/keytab/kt_file.c
===================================================================
--- trunk/src/lib/krb5/keytab/kt_file.c 2009-02-05 18:26:47 UTC (rev 21891)
+++ trunk/src/lib/krb5/keytab/kt_file.c 2009-02-05 18:34:57 UTC (rev 21892)
@@ -1722,6 +1722,9 @@
* Make sure we zero any trailing data.
*/
zero_point = ftell(KTFILEP(id));
+ if (zero_point < 0) {
+ return errno;
+ }
while ((size = fread(iobuf, 1, sizeof(iobuf), KTFILEP(id)))) {
if (size != sizeof(iobuf)) {
remainder = size % sizeof(krb5_int32);
More information about the cvs-krb5
mailing list