From 924f7628552dcc3f57a6c49b5ee13cee8a184eea Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Mon, 8 Mar 2010 11:28:56 +0000 Subject: [PATCH] CA-38105: Fix segfault in fork-and-exec-daemon. The segfault would have happened when a message was receieved on this socket without an associated fd being sent. This is bad behaviour on the part of the client, but shouldn't cause a segfault. This patch fixes the segfault, but we'll need to fix the client too! Signed-off-by: Jon Ludlam 0) { + if(ret>0 && msg.msg_controllen>0) { cmsg = CMSG_FIRSTHDR(&msg); if(cmsg->cmsg_level == SOL_SOCKET && (cmsg->cmsg_type == SCM_RIGHTS)) { fd=Val_int(*(int*)CMSG_DATA(cmsg)); -- 2.39.5