--- ray/src/hd/rholo4.c 1998/08/12 17:55:11 3.19 +++ ray/src/hd/rholo4.c 1998/10/22 08:47:40 3.21 @@ -16,6 +16,10 @@ static char SCCSid[] = "$SunId$ SGI"; #define HDSUF ".hdi" #endif +#ifndef FNONBLK +#define FNONBLK O_NONBLOCK +#endif + static int inp_flags; static int dpd[3]; static FILE *dpout; @@ -105,6 +109,8 @@ int block; return(2); /* acceptable failure */ } if (msg.nbytes) { /* get the message body */ + if (msg.nbytes < 0) + error(INTERNAL, "anti-message from display process"); buf = (char *)malloc(msg.nbytes); if (buf == NULL) error(SYSTEM, "out of memory in disp_check"); @@ -229,7 +235,11 @@ int type, nbytes; char *p; { MSGHEAD msg; - + /* consistency checks */ +#ifdef DEBUG + if (nbytes < 0 || nbytes > 0 & p == NULL) + error(CONSISTENCY, "bad buffer handed to disp_result"); +#endif if (dpout == NULL) return; msg.type = type;