[krbdev.mit.edu #6475] Adding keys to malformed keytabs can infinitely extend the file
Roland C. Dowdeswell via RT
rt-comment at krbdev.mit.edu
Wed Apr 22 12:23:07 EDT 2009
On 1240417069 seconds since the Beginning of the UNIX epoch
"krb5" wrote:
>
>+ bufsiz = (*size_needed + sizeof(krb5_int32));
As it turns out, I made a quite similar mistake. This line should
actually be:
bufsiz = (*size_needed + sizeof(krb5_int32)) - size;
In order to take care of what we've already written.
It might also be better to just fseek(3) out to the right place
and slap the sizeof(krb5_int32) zeros in place and fseek(3) back
to where we originally were. That would be much more clear but I
didn't read the standards to see if that would be properly portable.
--
Roland Dowdeswell http://Imrryr.ORG/~elric/
More information about the krb5-bugs
mailing list