Pádraig Brady <[email protected]> writes:

> * src/numfmt.c (simple_strtod_human): Check for NULL after pointer
> adjustment to avoid Out-of-range pointer offset (CWE-823).
> * NEWS: Mention the fix.
> ---
>  NEWS                 |  3 +++
>  src/numfmt.c         | 11 ++++++++---
>  tests/misc/numfmt.pl |  1 +
>  3 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index aa7c13f97..e6053a04b 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -18,6 +18,9 @@ GNU coreutils NEWS                                    -*- 
> outline -*-
>    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]
> +

Good catch. Patch looks good.

Collin

Reply via email to