mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-08 19:26:38 +02:00
* fix overflow
This commit is contained in:
parent
e6365c83ca
commit
9e0fb804f1
@ -67,7 +67,7 @@ implementation
|
|||||||
verbose,globals,
|
verbose,globals,
|
||||||
symconst,symdef,aasmbase,aasmtai,aasmcpu,defutil,
|
symconst,symdef,aasmbase,aasmtai,aasmcpu,defutil,
|
||||||
cpuinfo,cpubase,
|
cpuinfo,cpubase,
|
||||||
cgbase,tgobj,cgobj
|
cgbase,cgobj
|
||||||
{$ifdef delphi}
|
{$ifdef delphi}
|
||||||
,dmisc
|
,dmisc
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -268,6 +268,8 @@ implementation
|
|||||||
begin
|
begin
|
||||||
j:=1;
|
j:=1;
|
||||||
same_string:=true;
|
same_string:=true;
|
||||||
|
if len>0 then
|
||||||
|
begin
|
||||||
for i:=0 to len-1 do
|
for i:=0 to len-1 do
|
||||||
begin
|
begin
|
||||||
if tai_string(hp1).str[j]<>value_str[i] then
|
if tai_string(hp1).str[j]<>value_str[i] then
|
||||||
@ -279,6 +281,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
st_ansistring,
|
st_ansistring,
|
||||||
st_widestring :
|
st_widestring :
|
||||||
begin
|
begin
|
||||||
@ -308,6 +311,8 @@ implementation
|
|||||||
lastlabel:=tai_label(hp2.previous.previous.previous.previous).l;
|
lastlabel:=tai_label(hp2.previous.previous.previous.previous).l;
|
||||||
same_string:=true;
|
same_string:=true;
|
||||||
j:=0;
|
j:=0;
|
||||||
|
if len>0 then
|
||||||
|
begin
|
||||||
for i:=0 to len-1 do
|
for i:=0 to len-1 do
|
||||||
begin
|
begin
|
||||||
if tai_string(hp1).str[j]<>value_str[i] then
|
if tai_string(hp1).str[j]<>value_str[i] then
|
||||||
@ -320,6 +325,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
{ found ? }
|
{ found ? }
|
||||||
if same_string then
|
if same_string then
|
||||||
begin
|
begin
|
||||||
@ -572,7 +578,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.38 2004-03-16 16:19:44 peter
|
Revision 1.39 2004-03-18 17:29:40 peter
|
||||||
|
* fix overflow
|
||||||
|
|
||||||
|
Revision 1.38 2004/03/16 16:19:44 peter
|
||||||
* fix out of bounds for string compares
|
* fix out of bounds for string compares
|
||||||
|
|
||||||
Revision 1.37 2004/02/26 16:16:38 peter
|
Revision 1.37 2004/02/26 16:16:38 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user