mirror of
https://github.com/openssh/openssh-portable.git
synced 2026-11-06 05:16:43 +00:00
upstream: Fix potential 1-byte array overrun
in the case where read() returns exactly 100 bytes. Flagged by Coverity CID 901296, ok djm@ OpenBSD-Commit-ID: 66a96b08166e63dcbeed00297c33f09c4f22c1f7
This commit is contained in:
1 parent
70a4126283
commit
24168275e6
1 file changed
+2
-2
+2
-2
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ssh-sk-client.c,v 1.16 2026/03/10 03:45:01 deraadt Exp $ */
|
||||
/* $OpenBSD: ssh-sk-client.c,v 1.17 2026/03/11 09:04:17 dtucker Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2019 Google LLC
|
||||
*
|
||||
@@ -113,7 +113,7 @@ start_helper(int *fdp, pid_t *pidp, void (**osigchldp)(int))
|
||||
n = read(execpipe[0], execbuf, sizeof execbuf);
|
||||
close(execpipe[0]);
|
||||
if (n > 0) {
|
||||
execbuf[n] = '\0';
|
||||
execbuf[n - 1] = '\0';
|
||||
error_f("%s", execbuf);
|
||||
return SSH_ERR_AGENT_FAILURE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user