diff --git a/lib/cipher_funcs.c b/lib/cipher_funcs.c index e4da6eb6..93b118ce 100644 --- a/lib/cipher_funcs.c +++ b/lib/cipher_funcs.c @@ -74,9 +74,6 @@ get_random_data(unsigned char *data, const size_t len) int do_time = 0; size_t amt_read; - if(len < 0) - return; - /* Attempt to read seed data from /dev/urandom. If that does not * work, then fall back to a time-based method (less secure, but * probably more portable). diff --git a/lib/fko_util.c b/lib/fko_util.c index f885b59b..83997dfa 100644 --- a/lib/fko_util.c +++ b/lib/fko_util.c @@ -200,9 +200,6 @@ digest_inttostr(int digest, char* digest_str, size_t digest_size) { short digest_not_valid = 0; - if(digest_size < 0) - return -1; - memset(digest_str, 0, digest_size); switch (digest) @@ -303,9 +300,6 @@ hmac_digest_inttostr(int digest, char* digest_str, size_t digest_size) { short digest_not_valid = 0; - if(digest_size < 0) - return -1; - memset(digest_str, 0, digest_size); switch (digest) @@ -396,9 +390,6 @@ enc_mode_inttostr(int enc_mode, char* enc_mode_str, size_t enc_mode_size) unsigned char ndx_enc_mode; fko_enc_mode_str_t *enc_mode_str_pt; - if(enc_mode_size < 0) - return enc_mode_error; - /* Initialize the protocol string */ memset(enc_mode_str, 0, enc_mode_size); @@ -650,9 +641,6 @@ dump_ctx_to_buffer(fko_ctx_t ctx, char *dump_buf, size_t dump_buf_len) int encryption_mode = -1; int client_timeout = -1; - if(dump_buf_len < 0) - return err; - /* Zero-ed the buffer */ memset(dump_buf, 0, dump_buf_len);