Skip to content

Commit

Permalink
Another cbor negative limit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ndptech committed Dec 24, 2024
1 parent 82349e5 commit a74fd64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/util/cbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ static ssize_t cbor_decode_int64(int64_t *out, fr_dbuff_t *dbuff, fr_type_t type
slen = cbor_decode_integer(&value, info, &work_dbuff);
if (slen < 0) return_slen;

if (value > ((uint64_t) 1) << 63) goto invalid; /* greater than! */
if (value >= ((uint64_t) 1) << 63) goto invalid; /* greater than! */

/*
* Convert 0..(2^63-1) into -0..-(2^63-1)
Expand Down

0 comments on commit a74fd64

Please sign in to comment.