Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLN accept long path as cli parameter also if ccan hash a limit to it, but also specific machine has limit on the length of the path, so this explain why Rusty hard coded the upper limit of the length into ccan. So from https://unix.stackexchange.com/a/367012/369490 there is a good description to it. An extraction is: >SUSv3 doesn’t specify the size of the sun_path field. Early BSD implementations used 108 and 104 bytes, and one contemporary implementation (HP-UX 11) uses 92 bytes. Portable applications should code to this lower value, and use `snprintf()` or `strncpy()` to avoid buffer overruns when writing into this field. - OpenBSD: 104 characters - FreeBSD: 104 characters - Mac OS X 10.9: 104 characters P.S: Maybe we could increase the max length from 80 to 100 (?) Changelog-Fixed: cli: avoid accepting too long path Suggested-by: SimonVrouwe <s_github@protonmail.com> Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
- Loading branch information