mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Quiet Clang static analyzer.
This commit is contained in:
1 parent
964587274c
commit
70046f6e07
1 file changed
+4
-2
@@ -47,8 +47,10 @@ NSString *temporaryFilename(NSString *base)
|
||||
{
|
||||
NSString *template = [NSTemporaryDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.XXXXXXXXXX", base]];
|
||||
const char *fsrepr = [template fileSystemRepresentation];
|
||||
char *buffer = (char *)malloc(strlen(fsrepr) + 1);
|
||||
strcpy(buffer, fsrepr);
|
||||
|
||||
const size_t buffer_len = strlen(fsrepr) + 1;
|
||||
char *buffer = (char *)malloc(buffer_len);
|
||||
strlcpy(buffer, fsrepr, buffer_len);
|
||||
|
||||
// mkstemp() can't be used, beause it returns a file descriptor, and XAR API requires a filename
|
||||
NSString *ret = stringWithFileSystemRepresentation(mktemp(buffer));
|
||||
|
||||
Reference in new issue
Block a user