mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-28 05:14:34 +00:00
Use snprintf instead of sprintf to fix compile warning (#2179)
This commit is contained in:
1 file changed
+1
-1
@@ -329,7 +329,7 @@ NSString *displayHashFromRawHash(const unsigned char *hash)
|
||||
{
|
||||
char hexHash[CC_SHA1_DIGEST_LENGTH * 2 + 1] = {0};
|
||||
for (size_t i = 0; i < CC_SHA1_DIGEST_LENGTH; i++) {
|
||||
sprintf(hexHash + i * 2, "%02x", hash[i]);
|
||||
snprintf(hexHash + i * 2, 3, "%02x", hash[i]);
|
||||
}
|
||||
return @(hexHash);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user