glibc/crypt_blowfish-const.patch
Stephan Kulow ed1a911426 Accepting request 182499 from Base:System
- crypt_blowfish-gensalt.patch: separare crypt_gensalt into its own
  library libowcrypt, remove crypt_rn and crypt_ra (fate#314945)
- glibc-2.14-crypt-versioning.diff, glibc-fix-check-abi.patch,
  glibc-crypt-badsalttest.patch: folded into glibc-2.14-crypt.diff
- crypt_blowfish-const.patch: constify crypt_blowfish
- crypt_blowfish-1.2-sha.diff: refresh (forwarded request 182498 from Andreas_Schwab)

OBS-URL: https://build.opensuse.org/request/show/182499
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=150
2013-07-11 11:28:19 +00:00

47 lines
1.6 KiB
Diff

Index: crypt_blowfish-1.2/crypt_blowfish.c
===================================================================
--- crypt_blowfish-1.2.orig/crypt_blowfish.c
+++ crypt_blowfish-1.2/crypt_blowfish.c
@@ -81,7 +81,7 @@ typedef struct {
* Magic IV for 64 Blowfish encryptions that we do at the end.
* The string is "OrpheanBeholderScryDoubt" on big-endian.
*/
-static BF_word BF_magic_w[6] = {
+static const BF_word BF_magic_w[6] = {
0x4F727068, 0x65616E42, 0x65686F6C,
0x64657253, 0x63727944, 0x6F756274
};
@@ -89,7 +89,7 @@ static BF_word BF_magic_w[6] = {
/*
* P-box and S-box tables initialized with digits of Pi.
*/
-static BF_ctx BF_init_state = {
+static const BF_ctx BF_init_state = {
{
{
0xd1310ba6, 0x98dfb5ac, 0x2ffd72db, 0xd01adfb7,
@@ -361,10 +361,10 @@ static BF_ctx BF_init_state = {
}
};
-static unsigned char BF_itoa64[64 + 1] =
+static const unsigned char BF_itoa64[64 + 1] =
"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
-static unsigned char BF_atoi64[0x60] = {
+static const unsigned char BF_atoi64[0x60] = {
64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 1,
54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 64, 64, 64, 64, 64,
64, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
@@ -440,8 +440,8 @@ static void BF_encode(char *dst, const B
static void BF_swap(BF_word *x, int count)
{
- static int endianness_check = 1;
- char *is_little_endian = (char *)&endianness_check;
+ static const int endianness_check = 1;
+ const char *is_little_endian = (const char *)&endianness_check;
BF_word tmp;
if (*is_little_endian)