From ffb5e239f294b8855fb689b3f90213b89f4a048c Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Sat, 18 Nov 2006 00:52:09 +0000 Subject: [PATCH] catch client initiated write requests with invalid dbr types in the client library --- src/ca/tcpiiu.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ca/tcpiiu.cpp b/src/ca/tcpiiu.cpp index 09c9969fa..c5172a1fe 100644 --- a/src/ca/tcpiiu.cpp +++ b/src/ca/tcpiiu.cpp @@ -1388,6 +1388,9 @@ void tcpiiu::writeRequest ( epicsGuard < epicsMutex > & guard, // X aCC 431 nciu &chan, unsigned type, arrayElementCount nElem, const void *pValue ) { guard.assertIdenticalMutex ( this->mutex ); + if ( INVALID_DB_REQ ( type ) ) { + throw cacChannel::badType (); + } comQueSendMsgMinder minder ( this->sendQue, guard ); this->sendQue.insertRequestWithPayLoad ( CA_PROTO_WRITE, type, nElem, chan.getSID(guard), chan.getCID(guard), pValue, @@ -1405,6 +1408,9 @@ void tcpiiu::writeNotifyRequest ( epicsGuard < epicsMutex > & guard, // X aCC 43 if ( ! this->ca_v41_ok ( guard ) ) { throw cacChannel::unsupportedByService(); } + if ( INVALID_DB_REQ ( type ) ) { + throw cacChannel::badType (); + } comQueSendMsgMinder minder ( this->sendQue, guard ); this->sendQue.insertRequestWithPayLoad ( CA_PROTO_WRITE_NOTIFY, type, nElem, chan.getSID(guard), io.getId(), pValue,