mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 07:09:38 +01:00
* avoid range check error and overflow in objpas.hash, should resolve #39561
This commit is contained in:
parent
ee2d2a4bd4
commit
15b7a8763f
@ -336,7 +336,10 @@ begin
|
||||
For I:=1 to Length(S) do { 0 terminated }
|
||||
begin
|
||||
thehash:=thehash shl 4;
|
||||
{$push}
|
||||
{$R-}{$Q-}
|
||||
inc(theHash,Ord(S[i]));
|
||||
{$pop}
|
||||
g:=thehash and LongWord($f shl 28);
|
||||
if g<>0 then
|
||||
begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user