0001-lib-alg-gost3411-core.c-fix-conversion-error.patch 967 B

123456789101112131415161718192021222324252627282930
  1. From c7bf2cf8e610bb26bece7f3a2bc5b47d7c659c7d Mon Sep 17 00:00:00 2001
  2. From: "Guillaume W. Bres" <guillaume.bressaix@gmail.com>
  3. Date: Sat, 20 Feb 2021 16:51:04 +0100
  4. Subject: [PATCH] lib/alg-gost3411-core.c: fix conversion error seen by
  5. sensitive compilers
  6. Some compiler might be sensitive and raise an Warning/error on this line.
  7. Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
  8. [backported from upstream]
  9. ---
  10. lib/alg-gost3411-2012-core.c | 2 +-
  11. 1 file changed, 1 insertion(+), 1 deletion(-)
  12. diff --git a/lib/alg-gost3411-2012-core.c b/lib/alg-gost3411-2012-core.c
  13. index 13bb493..af3a36e 100644
  14. --- a/lib/alg-gost3411-2012-core.c
  15. +++ b/lib/alg-gost3411-2012-core.c
  16. @@ -92,7 +92,7 @@ add512(const uint512_u *x, const uint512_u *y, uint512_u *r)
  17. for (i = 0; i < 64; i++)
  18. {
  19. buf = xp[i] + yp[i] + (buf >> 8);
  20. - rp[i] = (unsigned char) buf & 0xFF;
  21. + rp[i] = (unsigned char) (buf & 0xFF);
  22. }
  23. #endif
  24. }
  25. --
  26. 2.20.1