diff options
author | fuzzard <fuzzard@kodi.tv> | 2023-06-13 17:00:16 +1000 |
---|---|---|
committer | fuzzard <fuzzard@kodi.tv> | 2023-06-18 09:47:57 +1000 |
commit | 42442585925e76dc51e49c4b7017ff5565e92695 (patch) | |
tree | ef294f07334dda02af50e02100529203e923ece2 /tools/depends | |
parent | e336a75f42d9c4efd3433f3fa6edd05309689deb (diff) |
TexturePacker change sprintf usage to snprintf
Diffstat (limited to 'tools/depends')
-rw-r--r-- | tools/depends/native/TexturePacker/src/TexturePacker.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/depends/native/TexturePacker/src/TexturePacker.cpp b/tools/depends/native/TexturePacker/src/TexturePacker.cpp index 38c31f500c..5c8304c5cb 100644 --- a/tools/depends/native/TexturePacker/src/TexturePacker.cpp +++ b/tools/depends/native/TexturePacker/src/TexturePacker.cpp @@ -258,11 +258,12 @@ bool TexturePacker::CheckDupe(MD5Context* ctx, MD5Final(digest,ctx); digest[16] = 0; char hex[33]; - sprintf(hex, "%02X%02X%02X%02X%02X%02X%02X%02X"\ - "%02X%02X%02X%02X%02X%02X%02X%02X", digest[0], digest[1], digest[2], - digest[3], digest[4], digest[5], digest[6], digest[7], digest[8], - digest[9], digest[10], digest[11], digest[12], digest[13], digest[14], - digest[15]); + snprintf(hex, sizeof(hex), + "%02X%02X%02X%02X%02X%02X%02X%02X" + "%02X%02X%02X%02X%02X%02X%02X%02X", + digest[0], digest[1], digest[2], digest[3], digest[4], digest[5], digest[6], digest[7], + digest[8], digest[9], digest[10], digest[11], digest[12], digest[13], digest[14], + digest[15]); hex[32] = 0; std::map<std::string, unsigned int>::iterator it = m_hashes.find(hex); if (it != m_hashes.end()) |