]> granicus.if.org Git - procps-ng/commit
top: be more careful with memcpy length specifications
authorJim Warner <james.warner@comcast.net>
Tue, 17 May 2022 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Wed, 18 May 2022 11:30:56 +0000 (21:30 +1000)
commitc00d09edf182e65105f2f5090342b3d0fddd4b12
treef73c55de250d891c69099538dce88360cb13f8de
parent73b4f1134fa588bc1f63edce969dd97a1ebd9ec9
top: be more careful with memcpy length specifications

Using 'mempcpy' was a mistake where plain old 'memcpy'
was appropriate. More importantly, the careless length
specified resulted in a SEGV under some circumstances.

[ namely, it occurred under a multi-threaded top and ]
[ the top program itself as focus + CtrlN 'environ'. ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c