Browse Source

revert. check is < 1, not < 0.

OPENBSD_5_4
tedu 11 years ago
parent
commit
c2b93759b2
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/lib/libutil/bcrypt_pbkdf.c

+ 3
- 1
src/lib/libutil/bcrypt_pbkdf.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: bcrypt_pbkdf.c,v 1.2 2013/06/04 15:54:32 tedu Exp $ */
/* $OpenBSD: bcrypt_pbkdf.c,v 1.3 2013/06/04 15:55:50 tedu Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@ -107,6 +107,8 @@ bcrypt_pbkdf(const char *pass, size_t passlen, const uint8_t *salt, size_t saltl
uint32_t count;
/* nothing crazy */
if (rounds < 1)
return -1;
if (passlen == 0 || saltlen == 0 || keylen == 0 ||
keylen > sizeof(out) * sizeof(out))
return -1;


Loading…
Cancel
Save