]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
asan: null pointer as arg 2 of memcpy
authorAlan Modra <amodra@gmail.com>
Thu, 1 May 2025 05:13:46 +0000 (14:43 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 1 May 2025 13:20:35 +0000 (22:50 +0930)
commita388feed3d4662623749a2e991ea802000cf74b7
treecad5a4f7c93328e2a9fbcc630a12b6a3070462fc
parentf72c4fa3d53b06992259293377ce17dad05c8701
asan: null pointer as arg 2 of memcpy

Replace xmalloc+memcpy+free with xrealloc, avoiding the asan warning
on the initial allocation where we had memcpy(p,0,0).

* cg_arcs.c (arc_add): Use xrealloc.
gprof/cg_arcs.c