summaryrefslogtreecommitdiff
path: root/lib/gnutls_cipher.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-01-14 23:34:10 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-01-21 01:05:59 +0100
commit99ad4c6b2ab76d386be76daed0c509e62d6334c7 (patch)
tree773f59bfd7a3df71e7244b381b1eb19090b17506 /lib/gnutls_cipher.c
parente000bcadabc1c06afa16f730239a80c26081689a (diff)
downloadgnutls-99ad4c6b2ab76d386be76daed0c509e62d6334c7.tar.gz
Modulo operations are only occuring on unsigned integers.
Diffstat (limited to 'lib/gnutls_cipher.c')
-rw-r--r--lib/gnutls_cipher.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gnutls_cipher.c b/lib/gnutls_cipher.c
index a323defb21..6da32f42fe 100644
--- a/lib/gnutls_cipher.c
+++ b/lib/gnutls_cipher.c
@@ -200,7 +200,8 @@ calc_enc_length (gnutls_session_t session, int data_size,
unsigned block_algo, unsigned auth_cipher, uint16_t blocksize)
{
uint8_t rnd;
- int length, ret;
+ unsigned int length;
+ int ret;
*pad = 0;
@@ -256,7 +257,7 @@ calc_enc_length (gnutls_session_t session, int data_size,
* and are not to be sent). Returns their size.
*/
static inline int
-make_preamble (opaque * uint64_data, opaque type, int length,
+make_preamble (opaque * uint64_data, opaque type, unsigned int length,
opaque ver, opaque * preamble)
{
opaque minor = _gnutls_version_get_minor (ver);