SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
24
devel/gettext/patches/patch-gettext-runtime_intl_log_c
Normal file
24
devel/gettext/patches/patch-gettext-runtime_intl_log_c
Normal file
|
@ -0,0 +1,24 @@
|
|||
--- gettext-runtime/intl/log.c.orig Tue Dec 4 07:28:58 2012
|
||||
+++ gettext-runtime/intl/log.c Wed Jan 16 23:06:10 2013
|
||||
@@ -66,6 +66,7 @@ _nl_log_untranslated_locked (const char *logfilename,
|
||||
{
|
||||
FILE *logfile;
|
||||
const char *separator;
|
||||
+ size_t len;
|
||||
|
||||
/* Can we reuse the last opened logfile? */
|
||||
if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
|
||||
@@ -82,10 +83,11 @@ _nl_log_untranslated_locked (const char *logfilename,
|
||||
last_logfilename = NULL;
|
||||
}
|
||||
/* Open the logfile. */
|
||||
- last_logfilename = (char *) malloc (strlen (logfilename) + 1);
|
||||
+ len = strlen (logfilename) + 1;
|
||||
+ last_logfilename = (char *) malloc (len);
|
||||
if (last_logfilename == NULL)
|
||||
return;
|
||||
- strcpy (last_logfilename, logfilename);
|
||||
+ strlcpy (last_logfilename, logfilename, len);
|
||||
last_logfile = fopen (logfilename, "a");
|
||||
if (last_logfile == NULL)
|
||||
return;
|
Loading…
Add table
Add a link
Reference in a new issue