hrev54667 adds 1 changeset to branch 'master'
old head: 097d6b9ce332df72740b7c1611944511704f89f0
new head: 1af900b16b36161093ae888d7317bf6a391e36de
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=1af900b16b36+%5E097d6b9ce332
----------------------------------------------------------------------------
1af900b16b36: TIFFTranslator: Fix -Wformat-security
Change-Id: I598547fcb098ab88b62ffc2762696093b0d0eb3b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3328
Reviewed-by: Jérôme Duval <jerome.duval@xxxxxxxxx>
[ Murai Takashi <tmurai01@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev54667
Commit: 1af900b16b36161093ae888d7317bf6a391e36de
URL: https://git.haiku-os.org/haiku/commit/?id=1af900b16b36
Author: Murai Takashi <tmurai01@xxxxxxxxx>
Date: Thu Oct 15 11:19:58 2020 UTC
Committer: Jérôme Duval <jerome.duval@xxxxxxxxx>
Commit-Date: Thu Oct 22 06:02:07 2020 UTC
----------------------------------------------------------------------------
1 file changed, 8 insertions(+), 8 deletions(-)
src/add-ons/translators/tiff/TIFFTranslator.cpp | 16 ++++++++--------
----------------------------------------------------------------------------
diff --git a/src/add-ons/translators/tiff/TIFFTranslator.cpp
b/src/add-ons/translators/tiff/TIFFTranslator.cpp
index 385fc631cf..e1a7676a19 100644
--- a/src/add-ons/translators/tiff/TIFFTranslator.cpp
+++ b/src/add-ons/translators/tiff/TIFFTranslator.cpp
@@ -207,8 +207,8 @@ identify_tiff_header(BPositionIO *inSource, BMessage
*ioExtension,
if (documentIndex < 1 || documentIndex > documentCount) {
// document index is invalid
- fprintf(stderr, B_TRANSLATE("identify_tiff_header:
invalid "
- "document index\n"));
+ fputs(B_TRANSLATE("identify_tiff_header: invalid "
+ "document index\n"), stderr);
return B_NO_TRANSLATOR;
}
}
@@ -216,8 +216,8 @@ identify_tiff_header(BPositionIO *inSource, BMessage
*ioExtension,
// identify the document the user specified or the first document
// if the user did not specify which document they wanted to identify
if (!TIFFSetDirectory(tif, documentIndex - 1)) {
- fprintf(stderr, B_TRANSLATE("identify_tiff_header: couldn't set
"
- "directory\n"));
+ fputs(B_TRANSLATE("identify_tiff_header: couldn't set "
+ "directory\n"), stderr);
return B_NO_TRANSLATOR;
}
@@ -233,8 +233,8 @@ identify_tiff_header(BPositionIO *inSource, BMessage
*ioExtension,
outInfo->quality = TIFF_IN_QUALITY;
outInfo->capability = TIFF_IN_CAPABILITY;
strcpy(outInfo->MIME, "image/tiff");
- snprintf(outInfo->name, sizeof(outInfo->name),
- B_TRANSLATE("TIFF image"));
+ strlcpy(outInfo->name, B_TRANSLATE("TIFF image"),
+ sizeof(outInfo->name));
}
if (!poutTIFF) {
@@ -603,7 +603,7 @@ write_tif_stream(TIFF* tif, BPositionIO* inSource,
color_space format,
TIFFTranslator::TIFFTranslator()
- : BaseTranslator(B_TRANSLATE("TIFF images"),
+ : BaseTranslator(B_TRANSLATE("TIFF images"),
B_TRANSLATE("TIFF image translator"),
TIFF_TRANSLATOR_VERSION,
sInputFormats, kNumInputFormats,
@@ -958,6 +958,6 @@ TIFFTranslator::DerivedTranslate(BPositionIO *inSource,
BView *
TIFFTranslator::NewConfigView(TranslatorSettings *settings)
{
- return new TIFFView(B_TRANSLATE("TIFFTranslator Settings"),
+ return new TIFFView(B_TRANSLATE("TIFFTranslator Settings"),
B_WILL_DRAW, settings);
}