summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index 365c72f017..9d841a195c 100644
--- a/doio.c
+++ b/doio.c
@@ -1435,6 +1435,8 @@ do_ipcctl(I32 optype, SV **mark, SV **sp)
semun.buf = &semds;
getinfo = (cmd == GETALL);
+ if (Semctl(id, 0, IPC_STAT, semun) == -1)
+ return -1;
infosize = semds.sem_nsems * sizeof(short);
/* "short" is technically wrong but much more portable
than guessing about u_?short(_t)? */