Merge pull request #400 from floppym/sha-rounds
libmisc: fix default value in SHA_get_salt_rounds()
This commit is contained in:
		| @@ -223,7 +223,7 @@ static /*@observer@*/const unsigned long SHA_get_salt_rounds (/*@null@*/int *pre | |||||||
| 		if ((-1 == min_rounds) && (-1 == max_rounds)) { | 		if ((-1 == min_rounds) && (-1 == max_rounds)) { | ||||||
| 			rounds = SHA_ROUNDS_DEFAULT; | 			rounds = SHA_ROUNDS_DEFAULT; | ||||||
| 		} | 		} | ||||||
|  | 		else { | ||||||
| 			if (-1 == min_rounds) { | 			if (-1 == min_rounds) { | ||||||
| 				min_rounds = max_rounds; | 				min_rounds = max_rounds; | ||||||
| 			} | 			} | ||||||
| @@ -237,6 +237,7 @@ static /*@observer@*/const unsigned long SHA_get_salt_rounds (/*@null@*/int *pre | |||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			rounds = (unsigned long) shadow_random (min_rounds, max_rounds); | 			rounds = (unsigned long) shadow_random (min_rounds, max_rounds); | ||||||
|  | 		} | ||||||
| 	} else if (0 == *prefered_rounds) { | 	} else if (0 == *prefered_rounds) { | ||||||
| 		rounds = SHA_ROUNDS_DEFAULT; | 		rounds = SHA_ROUNDS_DEFAULT; | ||||||
| 	} else { | 	} else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user