when size==0 is passed to strzcpy the expression size - 1 wraps around to SIZE_MAX as it is unsigned causing a buffer overflow
test: test.c:26: main: Assertion `rem == -2' failed.
zsh: IOT instruction (core dumped) ./bin/test
add early return for size == 0 to fix this
when size==0 is passed to strzcpy the expression size - 1 wraps around to SIZE_MAX as it is unsigned causing a buffer overflow
test: test.c:26: main: Assertion `rem == -2' failed.
zsh: IOT instruction (core dumped) ./bin/test
add early return for size == 0 to fix this