mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 22:47:59 +02:00
* fixed potential buffer overflow errors (reported by Stian Skjelstad,
mantis #17922) git-svn-id: trunk@16343 -
This commit is contained in:
parent
365c0d82bf
commit
fdfb21387f
@ -783,7 +783,7 @@ begin
|
||||
fillchar(secnamebuf,sizeof(secnamebuf),0);
|
||||
oldofs:=filepos(e.f);
|
||||
seek(e.f,e.secstrofs+elfsec.sh_name);
|
||||
blockread(e.f,secnamebuf,sizeof(secnamebuf),bufsize);
|
||||
blockread(e.f,secnamebuf,sizeof(secnamebuf)-1,bufsize);
|
||||
seek(e.f,oldofs);
|
||||
secname:=strpas(secnamebuf);
|
||||
if asecname=secname then
|
||||
@ -1141,7 +1141,7 @@ begin
|
||||
if length(dbgfn)=0 then
|
||||
exit;
|
||||
i:=align(length(dbgfn)+1,4);
|
||||
if i>dbglinklen then
|
||||
if (i+4)>dbglinklen then
|
||||
exit;
|
||||
move(dbglink[i],dbgcrc,4);
|
||||
{ current dir }
|
||||
|
Loading…
Reference in New Issue
Block a user