mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-23 04:34:27 +00:00
Merging in a fix to a bug which caused the user agent string not to be null-terminated.
This commit is contained in:
commit
dff6e0832c
1 file changed
+1
-1
@@ -32,7 +32,7 @@
|
||||
[appcast setDelegate:self];
|
||||
NSString *userAgent = [NSString stringWithFormat: @"%@/%@ Sparkle/%@", [aHost name], [aHost displayVersion], ([SPARKLE_BUNDLE objectForInfoDictionaryKey:@"CFBundleVersion"] ?: nil)];
|
||||
NSData * cleanedAgent = [userAgent dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
|
||||
userAgent = [NSString stringWithCString:[cleanedAgent bytes] encoding:NSASCIIStringEncoding];
|
||||
userAgent = [[[NSString alloc] initWithData:cleanedAgent encoding:NSASCIIStringEncoding] autorelease];
|
||||
[appcast setUserAgentString:userAgent];
|
||||
[appcast fetchAppcastFromURL:URL];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user