mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-28 11:42:44 +02:00
- readln(<pchar>) forbidden, there is no way to prevent an buffer overflow, fixes 4227
git-svn-id: trunk@810 -
This commit is contained in:
parent
39310ff5dd
commit
2f8fe7d2e6
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -5496,6 +5496,7 @@ tests/webtbf/tw4111.pp svneol=native#text/plain
|
|||||||
tests/webtbf/tw4139.pp svneol=native#text/plain
|
tests/webtbf/tw4139.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw4144.pp svneol=native#text/plain
|
tests/webtbf/tw4144.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw4153.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/tw4256.pp svneol=native#text/plain
|
||||||
tests/webtbf/uw0744.pp svneol=native#text/plain
|
tests/webtbf/uw0744.pp svneol=native#text/plain
|
||||||
tests/webtbf/uw0840a.pp svneol=native#text/plain
|
tests/webtbf/uw0840a.pp svneol=native#text/plain
|
||||||
|
@ -597,7 +597,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
pointerdef :
|
pointerdef :
|
||||||
begin
|
begin
|
||||||
if not is_pchar(para.left.resulttype.def) then
|
if (not is_pchar(para.left.resulttype.def)) or do_read then
|
||||||
begin
|
begin
|
||||||
CGMessagePos(para.fileinfo,type_e_cant_read_write_type);
|
CGMessagePos(para.fileinfo,type_e_cant_read_write_type);
|
||||||
error_para := true;
|
error_para := true;
|
||||||
|
7
tests/webtbf/tw4227.pp
Normal file
7
tests/webtbf/tw4227.pp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ %FAIL }
|
||||||
|
var
|
||||||
|
p : pchar;
|
||||||
|
|
||||||
|
begin
|
||||||
|
readln(p);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user