2
0
Эх сурвалжийг харах

o patch by Sergej Gorelkin:
* When OpenExeFile is called with an empty filename argument,
it apparently opens stdin and crashes immediately thereafter trying to seek in non-seekable stream.
The filename is empty whenever GetLineInfo is called with the address that does not belong to valid module.

git-svn-id: trunk@12802 -

florian 16 жил өмнө
parent
commit
8a940151a7
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      rtl/inc/exeinfo.pp

+ 2 - 0
rtl/inc/exeinfo.pp

@@ -1044,6 +1044,8 @@ begin
   fillchar(e,sizeof(e),0);
   e.bufsize:=sizeof(e.buf);
   e.filename:=fn;
+  if fn='' then   // we don't want to read stdin
+    exit;
   assign(e.f,fn);
   {$I-}
    ofm:=filemode;