Also non standard SHA2 tags with a bad length resulted in undefined behavior.
[bug introduced in coreutils-9.8]
+ 'numfmt' no longer reads out-of-bounds memory with trailing blanks in input.
+ [bug introduced with numfmt in coreutils-8.21]
+
'rm -d DIR' no longer fails on Ceph snapshot directories.
Although these directories are nonempty, 'rmdir DIR' succeeds on them.
[bug introduced in coreutils-8.16]
devmsg (" parsed numeric value: %Lf\n"
" input precision = %d\n", *value, (int)*precision);
- if (**endptr != '\0')
+ while (**endptr)
{
/* process suffix. */
while (isblank (to_uchar (**endptr)))
(*endptr)++;
+ if (**endptr == '\0')
+ break; /* Treat as no suffix. */
+
if (!valid_suffix (**endptr))
return SSE_INVALID_SUFFIX;
if (allowed_scaling == scale_auto && **endptr == 'i')
{
/* auto-scaling enabled, and the first suffix character
- is followed by an 'i' (e.g. Ki, Mi, Gi). */
+ is followed by an 'i' (e.g. Ki, Mi, Gi). */
scale_base = 1024;
- (*endptr)++; /* skip second ('i') suffix character. */
+ (*endptr)++; /* skip 'i' in suffix. */
devmsg (" Auto-scaling, found 'i', switching to base %d\n",
scale_base);
}
}
*precision = 0; /* Reset, to select precision based on scale. */
+
+ break;
}
long double multiplier = powerld (scale_base, power);
['suf-20',
'--suffix=Foo' . 'x' x 122 . 'y 0',
{OUT => '0Foo' . 'x' x 122 . 'y'}],
+ ['suf-21', "-d '' --from=si '4 '", {OUT => "4"}],
## GROUPING