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