upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/test_relayproc.cpp
diff options
context:
space:
mode:
authorbitflash-maintainer <noreply@bitflash.invalid>2026-09-02 16:42:39 +0000
committerbitflash-maintainer <noreply@bitflash.invalid>2026-09-02 16:42:39 +0000
commite3cc976ae3f211727e3fae702776aacca46efb0c (patch)
tree61966e75b38ce20e1f7089fac8a7da453c58e998 /src/test_relayproc.cpp
parent456b3b4a3372e7d13b764f41006bf2c15d92f46e (diff)
log: reject a -maxdebugfilesize that is not a plain count of MB
atoi64() is strtoll() with the endptr discarded, so it yields 0 for anything it cannot read. -maxdebugfilesize=1G and -maxdebugfilesize=1024MB both parsed as 0, which the roll reads as "never roll" -- indistinguishable from requesting that deliberately, and silent. An operator who wrote a unit suffix got no rotation and no warning. Only a negative value said anything. The multiplication was unchecked as well: a large enough N made nMB * 1024 * 1024 overflow to a negative cap, which disables the roll too. Parse with strtoll() and its endptr, and reject trailing characters, ERANGE, negatives, and any value that would overflow the byte cap -- each reported with the reason and the cap being kept. 0 still means never roll and is still accepted without comment.
Diffstat (limited to 'src/test_relayproc.cpp')
0 files changed, 0 insertions, 0 deletions