--- /usr/tmp/TmpDir.6616-0/src/libpcp/src/pdu.c_1.3 Wed Jan 29 05:25:54 2003 +++ src/libpcp/src/pdu.c Wed Jan 29 04:21:07 2003 @@ -522,8 +522,10 @@ * must be a small residual from moreinput(), since * pduread() guards against partial PDUs from read() ... * save what we have received and try to read some more + * Note this can only happen once per PDU, so the ntohl() + * below will _only_ be done one. */ - goto check_read_len; + goto check_read_len; /* continue, do not return */ } else if (len == PM_ERR_TIMEOUT) return PM_ERR_TIMEOUT; @@ -532,6 +534,7 @@ return len ? PM_ERR_IPC : 0; } +check_read_len: php->len = ntohl(php->len); if (php->len < 0) { __pmNotifyErr(LOG_ERR, "__pmGetPDU: fd=%d BINARY illegal len=%d in hdr", fd, php->len); @@ -548,8 +551,6 @@ return PM_ERR_TOOBIG; } -check_read_len: - if (len == php->len) /* return below */ ;