mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-16 19:38:26 +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);
|
fillchar(secnamebuf,sizeof(secnamebuf),0);
|
||||||
oldofs:=filepos(e.f);
|
oldofs:=filepos(e.f);
|
||||||
seek(e.f,e.secstrofs+elfsec.sh_name);
|
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);
|
seek(e.f,oldofs);
|
||||||
secname:=strpas(secnamebuf);
|
secname:=strpas(secnamebuf);
|
||||||
if asecname=secname then
|
if asecname=secname then
|
||||||
@ -1141,7 +1141,7 @@ begin
|
|||||||
if length(dbgfn)=0 then
|
if length(dbgfn)=0 then
|
||||||
exit;
|
exit;
|
||||||
i:=align(length(dbgfn)+1,4);
|
i:=align(length(dbgfn)+1,4);
|
||||||
if i>dbglinklen then
|
if (i+4)>dbglinklen then
|
||||||
exit;
|
exit;
|
||||||
move(dbglink[i],dbgcrc,4);
|
move(dbglink[i],dbgcrc,4);
|
||||||
{ current dir }
|
{ current dir }
|
||||||
|
Loading…
Reference in New Issue
Block a user