Remove patches applied in upstream tarball

This commit is contained in:
Björn Esser 2019-05-05 14:29:14 +02:00
parent f8a50b8a98
commit 3ba508ff0c
No known key found for this signature in database
GPG Key ID: F52E98007594C21D
3 changed files with 0 additions and 71 deletions

View File

@ -1,47 +0,0 @@
From 9b2e9bd79cb91f50dd713899544423808f932b09 Mon Sep 17 00:00:00 2001
From: Vitaly Chikunov <vt@altlinux.org>
Date: Sat, 4 May 2019 21:19:06 +0300
Subject: [PATCH] crypt-kat: Make unalignment test really unaligned.
As noted and suggested by Solar.
---
test/crypt-kat.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/test/crypt-kat.c b/test/crypt-kat.c
index 4402e24..19a79b1 100644
--- a/test/crypt-kat.c
+++ b/test/crypt-kat.c
@@ -200,24 +200,27 @@ static void *
calc_hashes_crypt_r_rn (ARG_UNUSED (void *unused))
{
char *hash;
- char pass[CRYPT_MAX_PASSPHRASE_SIZE];
+ union {
+ char pass[CRYPT_MAX_PASSPHRASE_SIZE + 1];
+ int aligned;
+ } u;
size_t i;
struct crypt_data data;
int status = 0;
memset (&data, 0, sizeof data);
- memset (pass, 0, CRYPT_MAX_PASSPHRASE_SIZE);
+ memset (u.pass, 0, CRYPT_MAX_PASSPHRASE_SIZE + 1);
for (i = 0; i < ntests; i++)
{
- strncpy(pass + 1, tests[i].input, CRYPT_MAX_PASSPHRASE_SIZE - 1);
+ strncpy(u.pass + 1, tests[i].input, CRYPT_MAX_PASSPHRASE_SIZE);
printf("[%d]: %s %s\n", strlen(tests[i].input), tests[i].input, tests[i].salt);
errno = 0;
- hash = crypt_r (pass + 1, tests[i].salt, &data);
+ hash = crypt_r (u.pass + 1, tests[i].salt, &data);
status |= report_result ("crypt_r", hash, errno, &tests[i],
ENABLE_FAILURE_TOKENS);
errno = 0;
- hash = crypt_rn (pass + 1, tests[i].salt, &data, (int)sizeof data);
+ hash = crypt_rn (u.pass + 1, tests[i].salt, &data, (int)sizeof data);
status |= report_result ("crypt_rn", hash, errno, &tests[i], false);
}

View File

@ -1,22 +0,0 @@
From 5cce1ebe4e8e303bab593af694c9d30c51cf5eb4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Sat, 4 May 2019 19:46:16 +0200
Subject: [PATCH] alg-gost3411-2012-core: Remove unneeded union keyword.
---
lib/alg-gost3411-2012-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/alg-gost3411-2012-core.c b/lib/alg-gost3411-2012-core.c
index f508ba8..13bb493 100644
--- a/lib/alg-gost3411-2012-core.c
+++ b/lib/alg-gost3411-2012-core.c
@@ -149,7 +149,7 @@ g(uint512_u *h, const uint512_u *N, const unsigned char *m)
static inline void
stage2(GOST34112012Context *CTX, const unsigned char *data)
{
- union uint512_u m;
+ uint512_u m;
memcpy(&m, data, sizeof(m));
g(&(CTX->h), &(CTX->N), (const unsigned char *)&m);

View File

@ -152,8 +152,6 @@ URL: https://github.com/besser82/%{name}
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
# Patch 0000 - 2999: Backported patches from upstream.
Patch0000: %{url}/commit/5cce1ebe4e8e303bab593af694c9d30c51cf5eb4.patch#/%{name}-4.4.5-remove_unneeded_union_keyword.patch
Patch0001: %{url}/commit/9b2e9bd79cb91f50dd713899544423808f932b09.patch#/%{name}-4.4.5-make_unalignment_test_really_unaligned.patch
# Patch 3000 - 5999: Backported patches from pull requests.