mirror of
https://github.com/openssh/openssh-portable.git
synced 2026-11-06 05:16:43 +00:00
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.
This commit is contained in:
1 file changed
-4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user