svn rev #22047: trunk/src/lib/krb5/keytab/
ghudson@MIT.EDU
ghudson at MIT.EDU
Mon Feb 23 14:30:36 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=22047
Commit By: ghudson
Log Message:
Check the return value of fseek in two places in kt_file.c.
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-23 18:47:28 UTC (rev 22046)
+++ trunk/src/lib/krb5/keytab/kt_file.c 2009-02-23 19:30:36 UTC (rev 22047)
@@ -795,7 +795,9 @@
keytab);
if (!kret) {
fpos = foff; /* XX range check? */
- fseek(KTFILEP(keytab), fpos, SEEK_SET);
+ if (fseek(KTFILEP(keytab), fpos,
+ SEEK_SET) == -1)
+ kret = errno;
}
}
kret = 0;
@@ -1437,7 +1439,11 @@
/*
* Reposition file pointer to the next inter-record length field.
*/
- fseek(KTFILEP(id), start_pos + size, SEEK_SET);
+ if (fseek(KTFILEP(id), start_pos + size, SEEK_SET) == -1) {
+ error = errno;
+ goto fail;
+ }
+
return 0;
fail:
More information about the cvs-krb5
mailing list