mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Fix length of program_argstring in main.c
This commit is contained in:
parent
5d3b52d0b8
commit
d9325f5db5
@ -1,3 +1,9 @@
|
|||||||
|
2014-11-28 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||||
|
|
||||||
|
* main.c: Fix length of program_argstring,
|
||||||
|
fix regression introduced with commit
|
||||||
|
9217b864d865cf1766e1589d138c8fc17d3d3d5c.
|
||||||
|
|
||||||
2014-11-28 Tim Ruehsen <tim.ruehsen@gmx.de>
|
2014-11-28 Tim Ruehsen <tim.ruehsen@gmx.de>
|
||||||
|
|
||||||
* Makefile.am: Removed gettext.h
|
* Makefile.am: Removed gettext.h
|
||||||
|
@ -1043,8 +1043,8 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
/* Construct the arguments string. */
|
/* Construct the arguments string. */
|
||||||
for (argstring_length = 1, i = 1; i < argc; i++)
|
for (argstring_length = 1, i = 1; i < argc; i++)
|
||||||
argstring_length += strlen (argv[i]) + 2 + 1;
|
argstring_length += strlen (argv[i]) + 3 + 1;
|
||||||
p = malloc (argstring_length * sizeof (char));
|
program_argstring = p = malloc (argstring_length);
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr, _("Memory allocation problem\n"));
|
fprintf (stderr, _("Memory allocation problem\n"));
|
||||||
@ -1062,7 +1062,6 @@ main (int argc, char **argv)
|
|||||||
*p++ = ' ';
|
*p++ = ' ';
|
||||||
}
|
}
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
program_argstring = p;
|
|
||||||
|
|
||||||
/* Load the hard-coded defaults. */
|
/* Load the hard-coded defaults. */
|
||||||
defaults ();
|
defaults ();
|
||||||
|
Loading…
Reference in New Issue
Block a user