Re: Fix boundary issue in chacha code

2016-10-07 Thread Otto Moerbeek
On Fri, Oct 07, 2016 at 03:06:28PM -0500, Brent Cook wrote: > > > On Oct 7, 2016, at 2:52 PM, Otto Moerbeek wrote: > > > > On Fri, Oct 07, 2016 at 02:33:13PM -0500, Brent Cook wrote: > > > >> > >>> On Oct 7, 2016, at 12:18 PM, Ted Unangst wrote: > >>> > >>> Kinichiro Inoguchi wrote: >

Re: Fix boundary issue in chacha code

2016-10-07 Thread Kinichiro Inoguchi
Sorry for my misunderstanding, and thanks for teaching me. I had read C99 standard document. http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf On p.130 6.7.8 Initialization "32 EXAMPLE 8 The declaration" says, - char s[] = "abc", t[3] = "abc"; defines ‘‘plain’’ char array obj

Re: Fix boundary issue in chacha code

2016-10-07 Thread Ted Unangst
Brent Cook wrote: > > > On Oct 7, 2016, at 12:18 PM, Ted Unangst wrote: > > > > Kinichiro Inoguchi wrote: > >> I think this 16 bytes string assignment has boundary issue. > >> > >>static const char sigma[16] = "expand 32-byte k"; > >> > >> I found this when I tried to build libressl-portab

Re: Fix boundary issue in chacha code

2016-10-07 Thread Brent Cook
> On Oct 7, 2016, at 2:52 PM, Otto Moerbeek wrote: > > On Fri, Oct 07, 2016 at 02:33:13PM -0500, Brent Cook wrote: > >> >>> On Oct 7, 2016, at 12:18 PM, Ted Unangst wrote: >>> >>> Kinichiro Inoguchi wrote: I think this 16 bytes string assignment has boundary issue. static c

Re: Fix boundary issue in chacha code

2016-10-07 Thread Otto Moerbeek
On Fri, Oct 07, 2016 at 02:33:13PM -0500, Brent Cook wrote: > > > On Oct 7, 2016, at 12:18 PM, Ted Unangst wrote: > > > > Kinichiro Inoguchi wrote: > >> I think this 16 bytes string assignment has boundary issue. > >> > >>static const char sigma[16] = "expand 32-byte k"; > >> > >> I found

Re: Fix boundary issue in chacha code

2016-10-07 Thread Brent Cook
> On Oct 7, 2016, at 12:18 PM, Ted Unangst wrote: > > Kinichiro Inoguchi wrote: >> I think this 16 bytes string assignment has boundary issue. >> >>static const char sigma[16] = "expand 32-byte k"; >> >> I found this when I tried to build libressl-portable with MSVC on Windows. > > anothe

Re: Fix boundary issue in chacha code

2016-10-07 Thread Ted Unangst
Kinichiro Inoguchi wrote: > I think this 16 bytes string assignment has boundary issue. > > static const char sigma[16] = "expand 32-byte k"; > > I found this when I tried to build libressl-portable with MSVC on Windows. another broken compiler? the above line is perfectly valid C.

Fix boundary issue in chacha code

2016-10-07 Thread Kinichiro Inoguchi
Hi, I think this 16 bytes string assignment has boundary issue. static const char sigma[16] = "expand 32-byte k"; I found this when I tried to build libressl-portable with MSVC on Windows. These 4 files have the same code above. lib/libc/crypt/chacha_private.h lib/libcrypto/chacha/chacha-