Parcourir la source

Merge branch 'fixes_3_2' of gitlab.com:freepascal.org/fpc/source into fixes_3_2

marcoonthegit il y a 2 ans
Parent
commit
9b97e5743e
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      compiler/scanner.pas

+ 2 - 1
compiler/scanner.pas

@@ -3561,7 +3561,8 @@ type
                  begin
                  begin
                    c:=inputpointer^;
                    c:=inputpointer^;
                    { eat utf-8 signature? }
                    { eat utf-8 signature? }
-                   if (ord(inputpointer^)=$ef) and
+                   if (bufsize>2) and
+                     (ord(inputpointer^)=$ef) and
                      (ord((inputpointer+1)^)=$bb) and
                      (ord((inputpointer+1)^)=$bb) and
                      (ord((inputpointer+2)^)=$bf) then
                      (ord((inputpointer+2)^)=$bf) then
                      begin
                      begin