mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 23:49:39 +02:00
* remove fixed limit for overall size of arguments for Dos.Exec and SysUtils.ExecuteProcess
git-svn-id: trunk@28975 -
This commit is contained in:
parent
1c74b752c5
commit
5d0bd53433
@ -211,9 +211,7 @@ var
|
|||||||
Prio: byte;
|
Prio: byte;
|
||||||
DSS: boolean;
|
DSS: boolean;
|
||||||
SR: SearchRec;
|
SR: SearchRec;
|
||||||
|
MaxArgsSize: word; (* Amount of memory reserved for arguments in bytes. *)
|
||||||
const
|
|
||||||
MaxArgsSize = 3072; (* Amount of memory reserved for arguments in bytes. *)
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{ LastDosExitCode := Exec (Path, ExecRunFlags (ExecFlags), efDefault, ComLine);}
|
{ LastDosExitCode := Exec (Path, ExecRunFlags (ExecFlags), efDefault, ComLine);}
|
||||||
@ -226,6 +224,7 @@ begin
|
|||||||
else
|
else
|
||||||
QName := Path;
|
QName := Path;
|
||||||
FindClose (SR);
|
FindClose (SR);
|
||||||
|
MaxArgsSize := Length (ComLine) + Length (QName) + 256; (* More than enough *)
|
||||||
if ComLine = '' then
|
if ComLine = '' then
|
||||||
begin
|
begin
|
||||||
Args0 := nil;
|
Args0 := nil;
|
||||||
|
@ -750,9 +750,9 @@ var
|
|||||||
ObjName: shortstring;
|
ObjName: shortstring;
|
||||||
RC: cardinal;
|
RC: cardinal;
|
||||||
ExecAppType: cardinal;
|
ExecAppType: cardinal;
|
||||||
|
MaxArgsSize: word; (* Amount of memory reserved for arguments in bytes. *)
|
||||||
|
|
||||||
const
|
const
|
||||||
MaxArgsSize = 3072; (* Amount of memory reserved for arguments in bytes. *)
|
|
||||||
ObjBufSize = 512;
|
ObjBufSize = 512;
|
||||||
|
|
||||||
function StartSession: cardinal;
|
function StartSession: cardinal;
|
||||||
@ -845,6 +845,7 @@ begin
|
|||||||
if (ApplicationType and 3 = ExecAppType and 3) then
|
if (ApplicationType and 3 = ExecAppType and 3) then
|
||||||
(* DosExecPgm should work... *)
|
(* DosExecPgm should work... *)
|
||||||
begin
|
begin
|
||||||
|
MaxArgsSize := Length (ComLine) + Length (Path) + 256; (* More than enough *)
|
||||||
if ComLine = '' then
|
if ComLine = '' then
|
||||||
begin
|
begin
|
||||||
Args0 := nil;
|
Args0 := nil;
|
||||||
|
Loading…
Reference in New Issue
Block a user