commit b21c4c927df760810943d63b35c0488ce22f755a from: deraadt date: Mon Jul 01 18:52:22 2024 UTC signal handler must use the save_errno dance, and massage a variable of type 'volatile sig_atomic_t' ok tb commit - d7da19ca6f6c025db92455cdbe3de3d7e9ab5905 commit + b21c4c927df760810943d63b35c0488ce22f755a blob - f50d224064f359b8d5062a2ae76c7a8bed160859 blob + 84ecb9b3baaae5b5e79c8d98e17f5e1fd78c1c0d --- usr.bin/openssl/speed.c +++ usr.bin/openssl/speed.c @@ -1,4 +1,4 @@ -/* $OpenBSD: speed.c,v 1.34 2023/07/27 07:01:50 tb Exp $ */ +/* $OpenBSD: speed.c,v 1.35 2024/07/01 18:52:22 deraadt Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -150,7 +150,7 @@ #include "./testrsa.h" #define BUFSIZE (1024*8+64) -int run = 0; +volatile sig_atomic_t run = 0; static int mr = 0; static int usertime = 1; @@ -193,7 +193,10 @@ static void sig_done(int sig); static void sig_done(int sig) { + int save_errno = errno; + signal(SIGALRM, sig_done); + errno = save_errno; run = 0; }