summaryrefslogtreecommitdiffstats
path: root/sshbuf.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2020-01-23 08:10:22 +0100
committerDarren Tucker <dtucker@dtucker.net>2020-01-23 08:51:25 +0100
commit3bf2a6ac791d64046a537335a0f1d5e43579c5ad (patch)
tree76fcc0f1be306541c074be4aed3aca66023f0962 /sshbuf.c
parentupstream: missing header change from previous; spotted by dtucker@ (diff)
downloadopenssh-3bf2a6ac791d64046a537335a0f1d5e43579c5ad.tar.xz
openssh-3bf2a6ac791d64046a537335a0f1d5e43579c5ad.zip
upstream: Replace all calls to signal(2) with a wrapper around
sigaction(2). This wrapper blocks all other signals during the handler preventing races between handlers, and sets SA_RESTART which should reduce the potential for short read/write operations. OpenBSD-Commit-ID: 5e047663fd77a40d7b07bdabe68529df51fd2519
Diffstat (limited to 'sshbuf.c')
-rw-r--r--sshbuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshbuf.c b/sshbuf.c
index adfddf775..f4f7a220f 100644
--- a/sshbuf.c
+++ b/sshbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshbuf.c,v 1.13 2018/11/16 06:10:29 djm Exp $ */
+/* $OpenBSD: sshbuf.c,v 1.14 2020/01/23 07:10:22 dtucker Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
@@ -42,7 +42,7 @@ sshbuf_check_sanity(const struct sshbuf *buf)
buf->off > buf->size)) {
/* Do not try to recover from corrupted buffer internals */
SSHBUF_DBG(("SSH_ERR_INTERNAL_ERROR"));
- signal(SIGSEGV, SIG_DFL);
+ ssh_signal(SIGSEGV, SIG_DFL);
raise(SIGSEGV);
return SSH_ERR_INTERNAL_ERROR;
}