diff options
| author | James McCoy <jamessan@jamessan.com> | 2025-02-25 21:58:22 -0500 |
|---|---|---|
| committer | James McCoy <jamessan@jamessan.com> | 2025-02-25 21:58:22 -0500 |
| commit | 453f2c52d29143af71436c7c7add52edc9af3bf3 (patch) | |
| tree | 3cfe24dcf381783c22c5e01e5134d90b6cf2e792 /test/functional/core/channels_spec.lua | |
| parent | a2b464944a4eb391fe6213304a4df5677845b52c (diff) | |
| download | rneovim-453f2c52d29143af71436c7c7add52edc9af3bf3.tar.gz rneovim-453f2c52d29143af71436c7c7add52edc9af3bf3.tar.bz2 rneovim-453f2c52d29143af71436c7c7add52edc9af3bf3.zip | |
fix(vim_snprintf): special-case handling of binary format
A binary format spec always expects a corresponding unsigned long long
value. However, that explicit handling didn't get included when porting
the code from Vim, so binary format spec was falling through to the
"unsigned" and "length_modifier = NUL" portion of the code:
} else {
// unsigned
switch (length_modifier) {
case NUL:
uarg = (tvs
? (unsigned)tv_nr(tvs, &arg_idx)
: (skip_to_arg(ap_types, ap_start, &ap, &arg_idx,
&arg_cur, fmt),
va_arg(ap, unsigned)));
break;
This incorrectly read an "unsigned" value from an "unsigned long long"
variable, which would produce incorrect results on certain platforms.
Diffstat (limited to 'test/functional/core/channels_spec.lua')
0 files changed, 0 insertions, 0 deletions
