about summary refs log tree commit diff
path: root/hurd
diff options
context:
space:
mode:
authorThomas Bushnell, BSG <thomas@gnu.org>1996-10-08 18:38:08 +0000
committerThomas Bushnell, BSG <thomas@gnu.org>1996-10-08 18:38:08 +0000
commitce7f605ba7d119d7aae336117a306167ede44916 (patch)
tree58b06149239c7abd2286d05f33155a7c36c1f2b3 /hurd
parentb853ee82a2701bc91a8e5215191901ea37227647 (diff)
downloadglibc-ce7f605ba7d119d7aae336117a306167ede44916.tar.gz
glibc-ce7f605ba7d119d7aae336117a306167ede44916.tar.xz
glibc-ce7f605ba7d119d7aae336117a306167ede44916.zip
*** empty log message ***
Tue Oct  8 13:58:31 1996  Thomas Bushnell, n/BSG  <thomas@gnu.ai.mit.edu>

	* hurd/ports-get.c (_hurd_ports_get): If the requested port is
	null, don't attempt mach_port_mod_refs.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/alloc-fd.c12
-rw-r--r--hurd/hurdsig.c1
2 files changed, 12 insertions, 1 deletions
diff --git a/hurd/alloc-fd.c b/hurd/alloc-fd.c
index f21d5bb8e1..dc6e64f3b7 100644
--- a/hurd/alloc-fd.c
+++ b/hurd/alloc-fd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -97,6 +97,13 @@ _hurd_alloc_fd (int *fd, int first_fd)
 	  else if (size <= first_fd)
 	    size = first_fd + 1;
 
+	  if (size * sizeof (*_hurd_dtable) < size)
+	    {
+	      /* Integer overflow! */
+	      errno = ENOMEM;
+	      goto out;
+	    }
+
 	  /* If we fail to allocate that, decrement the desired size
 	     until we succeed in allocating it.  */
 	  do
@@ -117,6 +124,8 @@ _hurd_alloc_fd (int *fd, int first_fd)
 	      /* Go back to the loop to initialize the first new slot.  */
 	      goto search;
 	    }
+	  else
+	    errno = ENOMEM;
 	}
       else
 	errno = EMFILE;
@@ -124,6 +133,7 @@ _hurd_alloc_fd (int *fd, int first_fd)
   else
     errno = EINVAL;		/* Bogus FIRST_FD value.  */
 
+ out:
   __mutex_unlock (&_hurd_dtable_lock);
   _hurd_critical_section_unlock (crit);
 
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index 1da3fa580d..1f58d13436 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -1024,6 +1024,7 @@ signal_allowed (int signo, mach_port_t refport)
     case SIGINFO:
     case SIGTTIN:
     case SIGTTOU:
+    case SIGWINCH:
       /* Job control signals can be sent by the controlling terminal.  */
       if (__USEPORT (CTTYID, port == refport))
 	goto win;