summaryrefslogtreecommitdiff
path: root/src/cnode/cnode-algorithm.cpp
diff options
context:
space:
mode:
authorYahya Civelek <yahyacivelek@ulakhaberlesme.com.tr>2026-04-29 13:51:48 +0300
committerYahya Civelek <yahyacivelek@ulakhaberlesme.com.tr>2026-04-29 14:54:53 +0300
commitfc06449dd9a255353cf21e369d5e3f1e74e8188d (patch)
treef66ff94402aacdb704604a5bfdabce111fd37950 /src/cnode/cnode-algorithm.cpp
parent519e60e15ab52f887b87a5474fdebbd45063b567 (diff)
downloadvyatta-cfg-fc06449dd9a255353cf21e369d5e3f1e74e8188d.tar.gz
vyatta-cfg-fc06449dd9a255353cf21e369d5e3f1e74e8188d.zip
T8587: address review feedback for u64 type support
- cli_def.l: reject out-of-range integer literals (errno==ERANGE) as a syntax error instead of silently classifying them as u32. - cli_new.c (val_cmp): unify u32/u64 comparison through strtoull() with errno/end-pointer validation so unparseable operands are skipped instead of silently compared as 0, and so mixed u32/u64 operands are evaluated correctly via the 64-bit path. - cli_new.c (cond_formats/cond_format_lens): replace the unused INT64_TYPE entries with NULL/0 sentinels and a comment, since INT64_TYPE is handled via its own branch in val_cmp(); this removes a latent foot-gun where '%llu' would write 8 bytes into a 4-byte unsigned int slot of left_parts[] if a future refactor routed INT64_TYPE through the generic path. - cli_new.c: introduce type compatibility helpers and apply them so that a u32-magnitude value is accepted in a u64 (INT64_TYPE) context (validate_value, char2val_notext) and so that comparisons between u32 and u64 operands proceed (check_comp, val_cmp). The reverse direction (u64-magnitude value into a u32 field) remains rejected to preserve u32 range enforcement.
Diffstat (limited to 'src/cnode/cnode-algorithm.cpp')
0 files changed, 0 insertions, 0 deletions