/
githubmirror
/
nettle
Обзор
Документация
Войти
/
githubmirror
/
nettle
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
SMP/SMP.patch
75 строк
2 KB
Matt Oliver
project: Update for 3.9 merge.
20 май 2023, 19:56
20 май 2023, 19:56
ae201f4
Код
Авторство
О чём код?
diff --git a/fat-x86_64.c b/fat-x86_64.c index 0a2fedf4..552ce939 100644 --- a/fat-x86_64.c +++ b/fat-x86_64.c @@ -178,8 +178,7 @@ fat_init (void) struct x86_features features; int verbose; - /* FIXME: Replace all getenv calls by getenv_secure? */ - verbose = getenv (ENV_VERBOSE) != NULL; + verbose = secure_getenv (ENV_VERBOSE) != NULL; if (verbose) fprintf (stderr, "libnettle: fat library initialization.\n"); diff --git a/streebog.c b/streebog.c index 7ad619d5..256d369f 100644 --- a/streebog.c +++ b/streebog.c @@ -1233,7 +1233,7 @@ streebog512_compress (struct streebog512_ctx *ctx, const uint8_t *input, uint64_ static void streebog_final (struct streebog512_ctx *ctx) { - uint64_t Z[8] = {}; + uint64_t Z[8] = {0}; unsigned int i; /* PAD. It does not count towards message length */ diff --git a/x86_64/aes.m4 b/x86_64/aes.m4 index 3bec9eae..9e728a9e 100644 --- a/x86_64/aes.m4 +++ b/x86_64/aes.m4 @@ -77,9 +77,9 @@ define(`AES_STORE', ` dnl AES_ROUND(table,a,b,c,d,out,ptr) dnl Computes one word of the AES round. Leaves result in $6. define(`AES_ROUND', ` - movzb LREG($2), $7 + movzbq LREG($2), $7 movl AES_TABLE0 ($1, $7, 4),$6 - movzb HREG($3), XREG($7) + movzbl HREG($3), XREG($7) xorl AES_TABLE1 ($1, $7, 4),$6 movl $4,XREG($7) shr `$'16,$7 @@ -94,7 +94,7 @@ dnl Computes one word of the final round. Leaves result in $6. Also dnl performs the first substitution step, on the least significant dnl byte, and rotates 8 bits. define(`AES_FINAL_ROUND', ` - movzb LREG($1),$7 + movzbq LREG($1),$7 movzbl ($5, $7), $6 movl $2,XREG($7) andl `$'0x0000ff00,XREG($7) @@ -113,18 +113,18 @@ dnl each of eax, ebx, ecx and edx, and also rotates dnl the words one byte to the left. dnl Uses that AES_SBOX == 0 define(`AES_SUBST_BYTE', ` - movzb LREG($1),$6 + movzbq LREG($1),$6 movb ($5, $6),LREG($1) roll `$'8,$1 - movzb LREG($2),$6 + movzbq LREG($2),$6 movb ($5, $6),LREG($2) roll `$'8,$2 - movzb LREG($3),$6 + movzbq LREG($3),$6 movb ($5, $6),LREG($3) roll `$'8,$3 - movzb LREG($4),$6 + movzbq LREG($4),$6 movb ($5, $6),LREG($4) roll `$'8,$4')dnl