projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e61bd0
)
Check the return value of fseek in two places in kt_file.c
author
Greg Hudson
<ghudson@mit.edu>
Mon, 23 Feb 2009 19:30:36 +0000
(19:30 +0000)
committer
Greg Hudson
<ghudson@mit.edu>
Mon, 23 Feb 2009 19:30:36 +0000
(19:30 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22047
dc483132
-0cff-0310-8789-
dd5450dbe970
src/lib/krb5/keytab/kt_file.c
patch
|
blob
|
history
diff --git
a/src/lib/krb5/keytab/kt_file.c
b/src/lib/krb5/keytab/kt_file.c
index df5cbb0bac6a5bf520a3842d9eb88200950bea13..6e535432c7680f71eaa2ac47a22716bd7b4abb0b 100644
(file)
--- a/
src/lib/krb5/keytab/kt_file.c
+++ b/
src/lib/krb5/keytab/kt_file.c
@@
-795,7
+795,9
@@
krb5_ktf_keytab_internalize(krb5_context kcontext, krb5_pointer *argp, krb5_octe
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
@@
krb5_ktfileint_internal_read_entry(krb5_context context, krb5_keytab id, krb5_ke
/*
* 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: