range_strinbuf(3)
okay so bestie, welcome to range_strinbuf(3) from the Library Functions Manual β it's giving range check for string in buffer, and honestly it's a tiny lil safety bouncer for your C strings. π
β¨ NAME β¨
range_strinbuf β range check for string in buffer
π SYNTAX π
#include <libowfat/rangecheck.h>
int range_strinbuf(const void* buf,size_t len,const void* stringstart);
π¦ DESCRIPTION π¦
range_strinbuf checks that the ASCIIZ-string starting at stringstart starts and ends within the buffer buf[0..len-1].
If the string is not 0-terminated but the length is known beforehand, use range_arrayinbuf instead. iykyk, different function, different vibe.
π RETURN VALUE π
- If the buffer is implausible (
bufisNULLorbuf+lenhas an integer overflow), return0. - If
stringstartpoints before or after the buffer, return0. - If there is no
'\0'within the buffer, return0. - Otherwise, return
1.
π₯ SEE ALSO π₯
xoxo, signing off from the Library Functions Manual, it's your girl range_strinbuf(3) π«Άβ¨
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms