Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread __sigaction14(): sanity check 'sig' before us...
details: https://anonhg.NetBSD.org/src/rev/9afbc9f30381
branches: trunk
changeset: 542431:9afbc9f30381
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Tue Jan 28 21:04:37 2003 +0000
description:
__sigaction14(): sanity check 'sig' before use, same way as sigaction1()
in kernel
diffstat:
lib/libpthread/pthread_sig.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (19 lines):
diff -r c1a33b92392b -r 9afbc9f30381 lib/libpthread/pthread_sig.c
--- a/lib/libpthread/pthread_sig.c Tue Jan 28 20:33:25 2003 +0000
+++ b/lib/libpthread/pthread_sig.c Tue Jan 28 21:04:37 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_sig.c,v 1.5 2003/01/25 00:43:38 nathanw Exp $ */
+/* $NetBSD: pthread_sig.c,v 1.6 2003/01/28 21:04:37 jdolecek Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -130,6 +130,9 @@
self = pthread__self();
if (act != NULL) {
+ if (sig <= 0 || sig >= _NSIG)
+ return (EINVAL);
+
/* Save the information for our internal dispatch. */
pthread_spinlock(self, &pt_sigacts_lock);
pt_sigacts[sig] = *act;
Home |
Main Index |
Thread Index |
Old Index