mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 02:29:12 +02:00
* Avoid using stack memory for argv elements to avoid corruption of help in setup_arguments
git-svn-id: trunk@17684 -
This commit is contained in:
parent
09e9d922c7
commit
4a7a054f13
@ -391,9 +391,20 @@ begin
|
|||||||
proxy_s[13]:=#0;
|
proxy_s[13]:=#0;
|
||||||
proxy_s[18]:=#0;
|
proxy_s[18]:=#0;
|
||||||
proxy_s[23]:=#0;
|
proxy_s[23]:=#0;
|
||||||
|
{ Do not set argv[2..4] to PROXY_S
|
||||||
|
values, because PROXY_S is on stack,
|
||||||
|
while ARGV[2..4] need to be on heap.
|
||||||
|
PM 2011-06-08
|
||||||
argv[2]:=@proxy_s[9];
|
argv[2]:=@proxy_s[9];
|
||||||
argv[3]:=@proxy_s[14];
|
argv[3]:=@proxy_s[14];
|
||||||
argv[4]:=@proxy_s[19];
|
argv[4]:=@proxy_s[19];}
|
||||||
|
allocarg(2,4);
|
||||||
|
strcopy(argv[2], @proxy_s[9]);
|
||||||
|
allocarg(3,4);
|
||||||
|
strcopy(argv[3], @proxy_s[14]);
|
||||||
|
allocarg(4,4);
|
||||||
|
strcopy(argv[4], @proxy_s[19]);
|
||||||
|
|
||||||
useproxy:=true;
|
useproxy:=true;
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user