[Keychain-commit] SF.net SVN: keychain:[464] trunk/Frameworks/Keychain/Keychain/ KeychainSearch.m
Status: Abandoned
Brought to you by:
wadetregaskis
|
From: <wad...@us...> - 2009-01-13 07:40:37
|
Revision: 464
http://keychain.svn.sourceforge.net/keychain/?rev=464&view=rev
Author: wadetregaskis
Date: 2009-01-13 07:40:32 +0000 (Tue, 13 Jan 2009)
Log Message:
-----------
* Fixed -[KeychainSearch _removeAttributesOfType:] to start from a valid index rather than one past the end, which causes an exception and the whole shebang to fail. Credit to Nathan Kinsinger for finding and fixing this issue.
Modified Paths:
--------------
trunk/Frameworks/Keychain/Keychain/KeychainSearch.m
Modified: trunk/Frameworks/Keychain/Keychain/KeychainSearch.m
===================================================================
--- trunk/Frameworks/Keychain/Keychain/KeychainSearch.m 2009-01-13 07:23:41 UTC (rev 463)
+++ trunk/Frameworks/Keychain/Keychain/KeychainSearch.m 2009-01-13 07:40:32 UTC (rev 464)
@@ -302,12 +302,12 @@
}
- (void)_removeAttributesOfType:(SecKeychainAttrType)type {
- NSUInteger i = [_attributes count];
+ NSInteger i = [_attributes count] - 1;
SearchAttribute *current;
// FLAG: this is tricky... we should either figure out a *reliable* way to remove the appropriate attributes from a predicate string, or perhaps better yet fully convert to allowing multiple (logically or'd) predicates on a single attribute, in which case this method can go away entirely.
- while (0 < i) {
+ while (0 <= i) {
current = [_attributes objectAtIndex:i];
if (type == [current type]) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|