stabbish

:)
git clone https://git.sr.ht/~ashymad/stabbish
Log | Files | Refs | README | LICENSE

commit 0f23ea8aeebe9162736b0f1ffc8f99a900cab5ac
parent 292edc9fe330e4c17298763c3efd8451c2adc486
Author: Szymon Mikulicz <szymon.mikulicz@posteo.net>
Date:   Sat,  4 Jul 2026 02:09:07 +0200

strdup for the UB

Diffstat:
Mmain.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.c b/main.c @@ -37,7 +37,7 @@ int main(int argc, char **argv) { } if (start_shell || payload == ENOPAYLOAD) { - argv[0] = "ash"; + argv[0] = strdup("ash"); return fexecve(busybox, argv, environ); } @@ -54,8 +54,8 @@ int main(int argc, char **argv) { } char **bb_argv = malloc(sizeof(char *) * (argc + 4)); - bb_argv[0] = "ash"; - bb_argv[1] = "-c"; + bb_argv[0] = strdup("ash"); + bb_argv[1] = strdup("-c"); bb_argv[2] = pasprintf(". /dev/fd/%i", payload); for (int i = 0; i <= argc; i++) { bb_argv[i + 3] = argv[i];