dbCa: dbCaPutLinkCallback prevent out of bounds write
The internal buffer of the caLink is sized based on the number of elements of the destination PV.
This commit is contained in:
@@ -381,6 +381,8 @@ long dbCaPutLinkCallback(struct link *plink,short dbrType,
|
||||
dbAddr.pfield = pca->pputNative;
|
||||
/*Following only used for DBF_STRING*/
|
||||
dbAddr.field_size = MAX_STRING_SIZE;
|
||||
if(nRequest>pca->nelements)
|
||||
nRequest = pca->nelements;
|
||||
status = aConvert(&dbAddr, pbuffer, nRequest, pca->nelements, 0);
|
||||
}
|
||||
link_action |= CA_WRITE_NATIVE;
|
||||
|
||||
Reference in New Issue
Block a user