Re: [U-Boot] [PATCH v3 2/2] image: Protect against overflow in unknown_msg()

2016-10-31 Thread Simon Glass
Hi Tom, On 28 October 2016 at 14:04, Tom Rini wrote: > On Fri, Oct 28, 2016 at 12:41:05PM -0700, Simon Glass wrote: >> Hi Tom, >> >> On 28 October 2016 at 11:59, Tom Rini wrote: >> > On Thu, Oct 27, 2016 at 08:18:39PM -0600, Simon Glass wrote: >> >> Coverity complains that this can overflow. If

Re: [U-Boot] [PATCH v3 2/2] image: Protect against overflow in unknown_msg()

2016-10-28 Thread Tom Rini
On Fri, Oct 28, 2016 at 12:41:05PM -0700, Simon Glass wrote: > Hi Tom, > > On 28 October 2016 at 11:59, Tom Rini wrote: > > On Thu, Oct 27, 2016 at 08:18:39PM -0600, Simon Glass wrote: > >> Coverity complains that this can overflow. If we later increase the size > >> of one of the strings in the

Re: [U-Boot] [PATCH v3 2/2] image: Protect against overflow in unknown_msg()

2016-10-28 Thread Simon Glass
Hi Tom, On 28 October 2016 at 11:59, Tom Rini wrote: > On Thu, Oct 27, 2016 at 08:18:39PM -0600, Simon Glass wrote: >> Coverity complains that this can overflow. If we later increase the size >> of one of the strings in the table, it could happen. >> >> Adjust the code to protect against this. >>

Re: [U-Boot] [PATCH v3 2/2] image: Protect against overflow in unknown_msg()

2016-10-28 Thread Tom Rini
On Thu, Oct 27, 2016 at 08:18:39PM -0600, Simon Glass wrote: > Coverity complains that this can overflow. If we later increase the size > of one of the strings in the table, it could happen. > > Adjust the code to protect against this. > > Signed-off-by: Simon Glass > Reported-by: Coverity (CID:

[U-Boot] [PATCH v3 2/2] image: Protect against overflow in unknown_msg()

2016-10-27 Thread Simon Glass
Coverity complains that this can overflow. If we later increase the size of one of the strings in the table, it could happen. Adjust the code to protect against this. Signed-off-by: Simon Glass Reported-by: Coverity (CID: 150964) --- Changes in v3: - Adjust to deal with what strncpy() actually