Merge ~dirk.zimoch/epics-base:emptyArrayCrashFix into epics-base:3.15

Proposed by Dirk Zimoch
Status: Merged
Approved by: Andrew Johnson
Approved revision: e48cdb48aca1fcd7cbf5dae518572b1f323e4be4
Merged at revision: 5b7f896312e1d8acc4c8e144400b74ab69c4d56f
Proposed branch: ~dirk.zimoch/epics-base:emptyArrayCrashFix
Merge into: epics-base:3.15
Diff against target: 16 lines (+5/-0)
1 file modified
src/ioc/db/dbAccess.c (+5/-0)
Reviewer Review Type Date Requested Status
Andrew Johnson Approve
Review via email: mp+379530@code.launchpad.net

Description of the change

This fix was originally included in merge request 378968 dbChannelForDBLinks against branch 7.0.

To post a comment you must log in.
Revision history for this message
Andrew Johnson (anj) wrote :

Merging.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/ioc/db/dbAccess.c b/src/ioc/db/dbAccess.c
2index 0b893ee..e5a63a9 100644
3--- a/src/ioc/db/dbAccess.c
4+++ b/src/ioc/db/dbAccess.c
5@@ -907,6 +907,11 @@ long dbGet(DBADDR *paddr, short dbrType,
6 } else {
7 DBADDR localAddr = *paddr; /* Structure copy */
8
9+ if (pfl->no_elements < 1) {
10+ status = S_db_badField;
11+ goto done;
12+ }
13+
14 localAddr.field_type = pfl->field_type;
15 localAddr.field_size = pfl->field_size;
16 localAddr.no_elements = pfl->no_elements;

Subscribers

People subscribed via source and target branches