aports/community/recutils/format-security.patch

67 lines
2.1 KiB
Diff

diff --git a/src/rec-fex.c b/src/rec-fex.c
index 96648ec..db1ae24 100644
--- a/src/rec-fex.c
+++ b/src/rec-fex.c
@@ -722,7 +722,7 @@ rec_fex_append (rec_fex_t fex,
if (fex->num_elems >= REC_FEX_MAX_ELEMS)
{
- fprintf (stderr,
+ fprintf (stderr, "%s",
_("internal error: REC_FEX_MAX_ELEMS exceeded. \
Please report this.\n"));
return NULL;
diff --git a/src/rec-types.c b/src/rec-types.c
index 4d4fda2..a98a21f 100644
--- a/src/rec-types.c
+++ b/src/rec-types.c
@@ -894,7 +894,7 @@ rec_type_new (const char *str)
break;
case REC_TYPE_NONE:
/* This point should not be reached. */
- fprintf (stderr,
+ fprintf (stderr, "%s",
_("internal error: rec-types: got REC_TYPE_NONE from \
rec_type_parse_type_kind() in rec_type_new().\n"));
exit (EXIT_FAILURE);
diff --git a/src/rec-utils.c b/src/rec-utils.c
index 4c60e6c..d70af09 100644
--- a/src/rec-utils.c
+++ b/src/rec-utils.c
@@ -82,7 +82,7 @@ rec_extract_file (const char *str)
if (regcomp (&regexp, "[ \n\t]" REC_FILE_REGEXP, REG_EXTENDED) != 0)
{
- fprintf (stderr,
+ fprintf (stderr, "%s",
_("internal error: rec_int_rec_extract_file:\
error compiling regexp.\n"));
return NULL;
@@ -112,7 +112,7 @@ rec_extract_url (const char *str)
if (regcomp (&regexp, REC_URL_REGEXP, REG_EXTENDED) != 0)
{
- fprintf (stderr,
+ fprintf (stderr, "%s",
_("internal error:\
rec_int_rec_extract_url: error compiling regexp.\n"));
return NULL;
@@ -143,7 +143,7 @@ rec_extract_type (const char *str)
/* TODO: use a REC_TYPE_NAME_RE */
if (regcomp (&regexp, REC_FNAME_RE, REG_EXTENDED) != 0)
{
- fprintf (stderr,
+ fprintf (stderr, "%s",
_("internal error:\
rec_int_rec_extract_url: error compiling regexp.\n"));
return NULL;
@@ -287,7 +287,7 @@ rec_match_int (const char *str,
if (regcomp (&regexp, reg, flags) != 0)
{
- fprintf (stderr, _("internal error: rec_match: error compiling regexp.\n"));
+ fprintf (stderr, "%s", _("internal error: rec_match: error compiling regexp.\n"));
return false;
}