sysv_msg.c (43426) | sysv_msg.c (45921) |
---|---|
1/* $Id: sysv_msg.c,v 1.18 1998/03/30 09:50:35 phk Exp $ */ | 1/* $Id: sysv_msg.c,v 1.19 1999/01/30 12:21:48 phk Exp $ */ |
2 3/* 4 * Implementation of SVID messages 5 * 6 * Author: Daniel Boulet 7 * 8 * Copyright 1993 Daniel Boulet and RTMX Inc. 9 * --- 981 unchanged lines hidden (view full) --- 991 /* 992 * Return the segments to the user 993 */ 994 995 next = msghdr->msg_spot; 996 for (len = 0; len < msgsz; len += msginfo.msgssz) { 997 size_t tlen; 998 | 2 3/* 4 * Implementation of SVID messages 5 * 6 * Author: Daniel Boulet 7 * 8 * Copyright 1993 Daniel Boulet and RTMX Inc. 9 * --- 981 unchanged lines hidden (view full) --- 991 /* 992 * Return the segments to the user 993 */ 994 995 next = msghdr->msg_spot; 996 for (len = 0; len < msgsz; len += msginfo.msgssz) { 997 size_t tlen; 998 |
999 if (msgsz > msginfo.msgssz) | 999 if (msgsz - len > msginfo.msgssz) |
1000 tlen = msginfo.msgssz; 1001 else | 1000 tlen = msginfo.msgssz; 1001 else |
1002 tlen = msgsz; | 1002 tlen = msgsz - len; |
1003 if (next <= -1) 1004 panic("next too low #3"); 1005 if (next >= msginfo.msgseg) 1006 panic("next out of range #3"); 1007 eval = copyout((caddr_t)&msgpool[next * msginfo.msgssz], 1008 user_msgp, tlen); 1009 if (eval != 0) { 1010#ifdef MSG_DEBUG_OK --- 20 unchanged lines hidden --- | 1003 if (next <= -1) 1004 panic("next too low #3"); 1005 if (next >= msginfo.msgseg) 1006 panic("next out of range #3"); 1007 eval = copyout((caddr_t)&msgpool[next * msginfo.msgssz], 1008 user_msgp, tlen); 1009 if (eval != 0) { 1010#ifdef MSG_DEBUG_OK --- 20 unchanged lines hidden --- |