Do not call memcpy with a NULL argument (PR gcov-profile/80413).
commitc8572ff7a2b0641f776a72e694db5c76eb6aea1e
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Apr 2017 11:51:28 +0000 (13 11:51 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Apr 2017 11:51:28 +0000 (13 11:51 +0000)
treefe6e31ea3731424b2034de5ecca201c14bee2789
parent41ae6df4a9fe6257cb90d8a9881432f9dec90ee7
Do not call memcpy with a NULL argument (PR gcov-profile/80413).

2017-04-13  Martin Liska  <mliska@suse.cz>

PR gcov-profile/80413
* gcov-io.c (gcov_write_string): Copy to buffer just when
allocated size is greater than zero.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246903 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gcov-io.c