-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zero length fields when freeing object contents
In krb5_free_data_contents() and krb5_free_checksum_contents(), zero the length as well as the data pointer to leave the object in a valid state. Add asserts to existing test harnesses to verify the new behavior. In the krb5 GSS mech's kg_checksum_channel_bindings(), remove the code to reallocate the checksum with xmalloc(), as it relied on krb5_free_checksum_contents() leaving the object in an invalid state. This code was added in commit a30fb4c to match an xfree() call, but commit 29337e7 replaced that xfree() with a krb5_free_checksum_contents(). (In addition, the xmalloc and xfree wrappers never evolved to do anything beyond malloc and free.) In kpropd's recv_database(), don't free outbuf until we are done using its length. [ghudson@mit.edu: rewrote commit message; edited doxygen comment changes to mention version] ticket: 8871 (new)
- Loading branch information
1 parent
a5aa596
commit 4a2c5d2
Showing
6 changed files
with
12 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters