From 8a940151a73ab16ae66cbbcc3dfbf1b4198a5ec0 Mon Sep 17 00:00:00 2001 From: florian Date: Thu, 26 Feb 2009 18:34:48 +0000 Subject: [PATCH] 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 - --- rtl/inc/exeinfo.pp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rtl/inc/exeinfo.pp b/rtl/inc/exeinfo.pp index 2d2c12cf4b..25753fd912 100644 --- a/rtl/inc/exeinfo.pp +++ b/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;