Reject NULL callback functions in ca_array_*_callback

Fixes lp:1369626
This commit is contained in:
Andrew Johnson
2014-09-17 10:21:07 -05:00
parent a5fe64a8ad
commit 02afb98f38
4 changed files with 19 additions and 4 deletions

View File

@@ -343,6 +343,9 @@ int epicsShareAPI ca_array_get_callback ( chtype type,
if ( type < 0 ) {
return ECA_BADTYPE;
}
if ( pfunc == NULL ) {
return ECA_BADFUNCPTR;
}
unsigned tmpType = static_cast < unsigned > ( type );
epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () );
@@ -416,6 +419,9 @@ int epicsShareAPI ca_array_put_callback ( chtype type, arrayElementCount count,
if ( type < 0 ) {
return ECA_BADTYPE;
}
if ( pfunc == NULL ) {
return ECA_BADFUNCPTR;
}
epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () );
pChan->eliminateExcessiveSendBacklog ( guard );
unsigned tmpType = static_cast < unsigned > ( type );