luad

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit eaede95bac98194a74eae342aabd6046117584a6
parent 0b9189a4129049050ac801418d6c2d9754a27a55
Author: Daniel Barlow <dan@telent.net>
Date:   Tue, 19 May 2026 21:21:45 +0100

check malloc failure

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

diff --git a/luad.c b/luad.c @@ -216,6 +216,9 @@ int main(int argc, char **argv) int len = recvmsg(socket, &msg , 0); int *peer_fds = fds_from_msg(&msg, 5); char *argline = malloc(len); + if(! argline) { + die("malloc failed"); + } memmove(argline, buf, len); pid_t child_pid = fork_lua(L, argline, len, peer_fds, 5);