Re: [PATCH] sm3: support to compile with libgcrypt

2017-11-20 Thread Jia Zhang
Hi Bruno, This fix looks good enough. Thanks, Jia 在 2017/11/21 上午7:11, Bruno Haible 写道: > The code in lib/gc-gnulib.c line 823 > sm3_finish_ctx (&ctx->sm3Context, ctx->hash); > passes a buffer of size 20 to a function which writes 32 bytes into it. > Thus provoking a buffer overrun. > > Thi

Re: [PATCH] sm3: support to compile with libgcrypt

2017-11-20 Thread Bruno Haible
The code in lib/gc-gnulib.c line 823 sm3_finish_ctx (&ctx->sm3Context, ctx->hash); passes a buffer of size 20 to a function which writes 32 bytes into it. Thus provoking a buffer overrun. This should fix it. 2017-11-20 Bruno Haible crypto/gc-sm3: Fix buffer overrun. * lib

Re: [PATCH] sm3: support to compile with libgcrypt

2017-10-29 Thread Jia Zhang
于 2017/10/29 下午4:24, Bruno Haible 写道: > Hi Jia, > >> I refreshed the patches based on the latest master branch. > > Thanks. > >> Basically the problem we discussed may still exist. > > Yes it still exists. The testdir for 'crypto/gc-sm3' fails to compile for me, > whereas 'crypto/gc-sha1' wor

Re: [PATCH] sm3: support to compile with libgcrypt

2017-10-29 Thread Bruno Haible
Hi Jia, > I refreshed the patches based on the latest master branch. Thanks. > Basically the problem we discussed may still exist. Yes it still exists. The testdir for 'crypto/gc-sm3' fails to compile for me, whereas 'crypto/gc-sha1' works. The following fixes it for me: diff --git a/modules/c

[PATCH] sm3: support to compile with libgcrypt

2017-10-28 Thread Jia Zhang
Hi Bruno, I refreshed the patches based on the latest master branch. Basically the problem we discussed may still exist. But anyway we have a clear patch without the sm3 basis. Changelog: - fix the following 10 failures: [gc-gnulib.c] 8 failures lib/gc-gnulib.c: In function 'gc_init': lib/gc-gn