Skip to content

Commit

Permalink
Ensure the library doesn't initialize if hash can't be randomized
Browse files Browse the repository at this point in the history
  • Loading branch information
lpereira committed May 18, 2024
1 parent 5472927 commit d2d91b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ __attribute__((constructor(65535))) static void initialize_fnv1a_seed(void)
/* The seeds are randomized in order to mitigate the DDoS attack
* described by Crosby and Wallach in UsenixSec2003. */
if (UNLIKELY(lwan_getentropy(entropy, sizeof(entropy), 0) < 0)) {
lwan_status_perror("Could not initialize FNV1a seed");
lwan_status_critical_perror("Could not initialize FNV1a seed");
__builtin_unreachable();
}

Expand Down

0 comments on commit d2d91b5

Please sign in to comment.