[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] telnet: Use memove for overlapping memory instead of strncpy
From: |
Alfred M. Szmidt |
Subject: |
Re: [PATCH] telnet: Use memove for overlapping memory instead of strncpy |
Date: |
Sat, 02 May 2020 03:44:17 -0400 |
+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.
- Re: [PATCH] telnet: Use memove for overlapping memory instead of strncpy,
Alfred M. Szmidt <=