[haiku-commits] haiku: hrev54669 - src/add-ons/translators/icns

  • From: Jérôme Duval <jerome.duval@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 22 Oct 2020 02:11:03 -0400 (EDT)

hrev54669 adds 1 changeset to branch 'master'
old head: 1a7208e060deb8cd1e2309891bfbe977f083774f
new head: 380234c5d87882bbf0c4aefaac28b6761b80fcdd
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=380234c5d878+%5E1a7208e060de

----------------------------------------------------------------------------

380234c5d878: ICNSTranslator: Fix -Wformat-security
  
  Change-Id: Id5b4506b66f43a776b2850c92fd352a7d25ec5a9
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/3334
  Reviewed-by: Jérôme Duval <jerome.duval@xxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev54669
Commit:      380234c5d87882bbf0c4aefaac28b6761b80fcdd
URL:         https://git.haiku-os.org/haiku/commit/?id=380234c5d878
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Wed Oct 14 12:08:10 2020 UTC
Committer:   Jérôme Duval <jerome.duval@xxxxxxxxx>
Commit-Date: Thu Oct 22 06:10:49 2020 UTC

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
src/add-ons/translators/icns/ICNSTranslator.cpp | 2 +-

----------------------------------------------------------------------------

diff --git a/src/add-ons/translators/icns/ICNSTranslator.cpp 
b/src/add-ons/translators/icns/ICNSTranslator.cpp
index e2dee9771b..a249853ca5 100644
--- a/src/add-ons/translators/icns/ICNSTranslator.cpp
+++ b/src/add-ons/translators/icns/ICNSTranslator.cpp
@@ -145,7 +145,7 @@ ICNSTranslator::DerivedIdentify(BPositionIO *stream,
        BString iconName("Apple icon");
        if (documentCount > 1)
                iconName << " #" << documentIndex;
-       snprintf(info->name, sizeof(info->name), iconName.String());
+       strlcpy(info->name, iconName.String(), sizeof(info->name));
        strcpy(info->MIME, kICNSMimeType);
 
        return B_OK;


Other related posts:

  • » [haiku-commits] haiku: hrev54669 - src/add-ons/translators/icns - Jérôme Duval