This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gcc/gcc.c: XNEWVEC enough space for 'saved_suffix' using


On 07/31/2014 06:12 AM, Joseph S. Myers wrote:
> On Thu, 24 Jul 2014, Chen Gang wrote:
> 
>> strlen() will get string length excluding '\0', but strcpy() will append
>> '\0' in the end, so need XNEWVEC additional byte, or cause memory over
>> flow.
> 
> OK assuming it passed regression testing (with ChangeLog entry as usual, 
> and you need to say what platform the patch was bootstrapped / regression 
> tested on).
> 

Excuse me, I only find it by reading source code, not give a test (for
me, this kind of patch welcomes the related test, but not mandatory).

But, if you still feel it is necessary to have a related test, I shall
try.


Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]