git.ithinksw.org
/
MenuTunes.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Using the universal libValidate. Fixed a small Audioscrobbler crash that could happen...
[MenuTunes.git]
/
PreferencesController.m
diff --git
a/PreferencesController.m
b/PreferencesController.m
index
962b7d8
..
2b1bbf8
100755
(executable)
--- a/
PreferencesController.m
+++ b/
PreferencesController.m
@@
-183,15
+183,14
@@
static PreferencesController *prefs = nil;
if (status != noErr) {
ITDebugLog(@"Audioscrobbler: Error getting keychain item password: %i", status);
} else {
if (status != noErr) {
ITDebugLog(@"Audioscrobbler: Error getting keychain item password: %i", status);
} else {
- NSLog(@"Audioscrobbler: password buffer: \"%s\" \"Length: %i\"", buffer, length);
- pass = [[NSString alloc] initWithCharacters:(unichar *)buffer length:length];
+ pass = [[NSString alloc] initWithBytes:buffer length:length encoding:NSUTF8StringEncoding];
}
if (status != noErr) {
ITDebugLog(@"Audioscrobbler: Error deleting keychain item: %i", status);
}
}
if (status != noErr) {
ITDebugLog(@"Audioscrobbler: Error deleting keychain item: %i", status);
}
+ SecKeychainItemFreeContent(NULL, buffer);
CFRelease(item);
}
CFRelease(item);
}
- NSLog(@"Audioscrobbler: Retrieved password: \"%@\"", pass);
return [pass autorelease];
}
return [pass autorelease];
}