Skip to content

Commit

Permalink
Fix ULong config boundary checking (valkey-io#752)
Browse files Browse the repository at this point in the history
I noticed in valkey-io#738 that we don't properly check ULong config boundaries
and made the change there. I'm pulling out that particular commit into
this PR since we don't know if we want to merge the configurable cluster
blacklist TTL yet.

---------

Signed-off-by: Brennan Cathcart <[email protected]>
Signed-off-by: Madelyn Olson <[email protected]>
Co-authored-by: Madelyn Olson <[email protected]>
  • Loading branch information
2 people authored and zvi-code committed Jul 14, 2024
1 parent e9c9786 commit 54b83db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2054,6 +2054,7 @@ static void numericConfigInit(standardConfig *config) {

static int numericBoundaryCheck(standardConfig *config, long long ll, const char **err) {
if (config->data.numeric.numeric_type == NUMERIC_TYPE_ULONG_LONG ||
config->data.numeric.numeric_type == NUMERIC_TYPE_ULONG ||
config->data.numeric.numeric_type == NUMERIC_TYPE_UINT ||
config->data.numeric.numeric_type == NUMERIC_TYPE_SIZE_T) {
/* Boundary check for unsigned types */
Expand Down

0 comments on commit 54b83db

Please sign in to comment.