- readln(<pchar>) forbidden, there is no way to prevent an buffer overflow, fixes 4227

git-svn-id: trunk@810 -
This commit is contained in:
florian 2005-08-07 09:18:21 +00:00
parent 39310ff5dd
commit 2f8fe7d2e6
3 changed files with 9 additions and 1 deletions

1
.gitattributes vendored
View File

@ -5496,6 +5496,7 @@ tests/webtbf/tw4111.pp svneol=native#text/plain
tests/webtbf/tw4139.pp svneol=native#text/plain
tests/webtbf/tw4144.pp svneol=native#text/plain
tests/webtbf/tw4153.pp svneol=native#text/plain
tests/webtbf/tw4227.pp svneol=native#text/plain
tests/webtbf/tw4256.pp svneol=native#text/plain
tests/webtbf/uw0744.pp svneol=native#text/plain
tests/webtbf/uw0840a.pp svneol=native#text/plain

View File

@ -597,7 +597,7 @@ implementation
end;
pointerdef :
begin
if not is_pchar(para.left.resulttype.def) then
if (not is_pchar(para.left.resulttype.def)) or do_read then
begin
CGMessagePos(para.fileinfo,type_e_cant_read_write_type);
error_para := true;

7
tests/webtbf/tw4227.pp Normal file
View File

@ -0,0 +1,7 @@
{ %FAIL }
var
p : pchar;
begin
readln(p);
end.