[packages/guile1: 107/172] - avoid SEGV when ttyname() returns NULL (e.g. with no /proc)

jajcus jajcus at pld-linux.org
Sat Dec 12 13:47:47 CET 2015


commit 9ec6707744e46d5aba322fb3e7803e7d7513dd65
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Jul 25 17:56:06 2004 +0000

    - avoid SEGV when ttyname() returns NULL (e.g. with no /proc)
    
    Changed files:
        guile-ttyname.patch -> 1.1

 guile-ttyname.patch | 11 +++++++++++
 1 file changed, 11 insertions(+)
---
diff --git a/guile-ttyname.patch b/guile-ttyname.patch
new file mode 100644
index 0000000..2870719
--- /dev/null
+++ b/guile-ttyname.patch
@@ -0,0 +1,11 @@
+--- guile-1.6.4/libguile/fports.c.orig	2002-12-07 22:41:31.000000000 +0000
++++ guile-1.6.4/libguile/fports.c	2004-07-25 17:19:02.609575556 +0000
+@@ -505,7 +505,7 @@
+       fdes = (SCM_FSTREAM (exp))->fdes;
+       
+ #ifdef HAVE_TTYNAME
+-      if (isatty (fdes))
++      if (isatty (fdes) && (ttyname (fdes) != NULL))
+ 	scm_puts (ttyname (fdes), port);
+       else
+ #endif /* HAVE_TTYNAME */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/guile1.git/commitdiff/ebe6c26bec9cbe3813afc2be58f989889f8e944a



More information about the pld-cvs-commit mailing list