Commit 6ef4752b by Tom Tromey Committed by Tom Tromey

cplus-dem.c (remember_Btype): Don't call memcpy with LEN==0.

2018-07-30  Tom Tromey  <tom@tromey.com>

	* cplus-dem.c (remember_Btype): Don't call memcpy with LEN==0.

From-SVN: r263069
parent cff431d2
2018-07-30 Tom Tromey <tom@tromey.com>
* cplus-dem.c (remember_Btype): Don't call memcpy with LEN==0.
2018-07-26 Martin Liska <mliska@suse.cz>
PR lto/86548
......
......@@ -4471,7 +4471,8 @@ remember_Btype (struct work_stuff *work, const char *start,
char *tem;
tem = XNEWVEC (char, len + 1);
memcpy (tem, start, len);
if (len > 0)
memcpy (tem, start, len);
tem[len] = '\0';
work -> btypevec[index] = tem;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment