[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] telnet: Use memove for overlapping memory instead of strncpy
From: |
Tim Rühsen |
Subject: |
Re: [PATCH] telnet: Use memove for overlapping memory instead of strncpy |
Date: |
Sat, 2 May 2020 12:38:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
Thanks for review. Pushed.
On 02.05.20 09:44, Alfred M. Szmidt wrote:
> +2020-04-27 Tim Rühsen <address@hidden>
> +
> + telnet: Use memove for overlapping memory instead of strncpy.
> +
> + Overlapping source and destination buffers are not supported
> + by strncpy and give undefined results.
> +
> + 7.24.2.3 of ISO/IEC 9899:201x:
> + "If copying takes place between objects thatoverlap,
> + the behavior is undefined."
> +
> + * telnet/commands.c (cmds): Use memove for overlapping memory
> + instead of strncpy.
>
> LGTM, please commit to master.
>
signature.asc
Description: OpenPGP digital signature