[openssh-commits] [openssh] branch master updated: Remove %w from snprintf compat code.

git+noreply at mindrot.org git+noreply at mindrot.org
Sun Oct 11 21:29:03 AEDT 2026


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new 73c1399eb Remove %w from snprintf compat code.
73c1399eb is described below

commit 73c1399eb4380e0bfdbe4e2e205a6e2cf48f2844
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Sun Oct 11 20:52:59 2026 +1100

    Remove %w from snprintf compat code.
    
    It's not part of the standard, we don't use it and rsync, from whence the
    code originated, removed it in 2007 along with a bunch of other changes
    Also fixes a potential out-of bounds read if (%w is used, which we don't).
    
    Prompted by github PR#717.
---
 openbsd-compat/bsd-snprintf.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c
index 97892adbd..56160eeca 100644
--- a/openbsd-compat/bsd-snprintf.c
+++ b/openbsd-compat/bsd-snprintf.c
@@ -468,10 +468,6 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args_in)
 			case '%':
 				DOPR_OUTCH(buffer, currlen, maxlen, ch);
 				break;
-			case 'w':
-				/* not supported yet, treat as next char */
-				ch = *format++;
-				break;
 			default:
 				/* Unknown, skip */
 				break;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list