diff options
author | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-03-20 22:39:43 +0200 |
---|---|---|
committer | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-03-20 22:39:43 +0200 |
commit | 292ba138161dc8aabb14dd738a38b0cbe15a6e68 (patch) | |
tree | b911e4f98d09092ee05fb74bbbbefc7d84a4ddf0 /dev-libs/libstrophe/files/libstrophe-fix-crash-on-non-latin1.patch | |
parent | ffe7c06bc54d5b158bd0bb8fc1e304a7a0e8296d (diff) | |
download | profanity-292ba138161dc8aabb14dd738a38b0cbe15a6e68.tar.gz profanity-292ba138161dc8aabb14dd738a38b0cbe15a6e68.tar.xz |
dev-libs/libstrophe: added 2 patches
libstrophe-fix-crash-on-non-latin1.patch
libstrophe-fix-memory-leaks.patch
Diffstat (limited to 'dev-libs/libstrophe/files/libstrophe-fix-crash-on-non-latin1.patch')
-rw-r--r-- | dev-libs/libstrophe/files/libstrophe-fix-crash-on-non-latin1.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/dev-libs/libstrophe/files/libstrophe-fix-crash-on-non-latin1.patch b/dev-libs/libstrophe/files/libstrophe-fix-crash-on-non-latin1.patch new file mode 100644 index 0000000..41699ad --- /dev/null +++ b/dev-libs/libstrophe/files/libstrophe-fix-crash-on-non-latin1.patch @@ -0,0 +1,20 @@ +diff --git a/src/hash.c b/src/hash.c +index 27d2756..111149a 100644 +--- a/src/hash.c ++++ b/src/hash.c +@@ -109,13 +109,13 @@ void hash_release(hash_t * const table) + /** hash a key for our table lookup */ + static int _hash_key(hash_t *table, const char *key) + { +- int hash = 0; ++ unsigned int hash = 0; + int shift = 0; + const char *c = key; + + while (*c != '\0') { + /* assume 32 bit ints */ +- hash ^= ((int)*c++ << shift); ++ hash ^= ((unsigned int)*c++ << shift); + shift += 8; + if (shift > 24) shift = 0; + } |