EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: [Merge] ~dirk.zimoch/epics-base:emptyArrayCrashFix into epics-base:3.15
From: Dirk Zimoch via Core-talk <core-talk at aps.anl.gov>
To: mp+379530 at code.launchpad.net
Date: Thu, 20 Feb 2020 09:20:42 -0000
Dirk Zimoch has proposed merging ~dirk.zimoch/epics-base:emptyArrayCrashFix into epics-base:3.15.

Requested reviews:
  EPICS Core Developers (epics-core)

For more details, see:
https://code.launchpad.net/~dirk.zimoch/epics-base/+git/epics-base/+merge/379530

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

-- 
Your team EPICS Core Developers is requested to review the proposed merge of ~dirk.zimoch/epics-base:emptyArrayCrashFix into epics-base:3.15.
diff --git a/src/ioc/db/dbAccess.c b/src/ioc/db/dbAccess.c
index 0b893ee..e5a63a9 100644
--- a/src/ioc/db/dbAccess.c
+++ b/src/ioc/db/dbAccess.c
@@ -907,6 +907,11 @@ long dbGet(DBADDR *paddr, short dbrType,
         } else {
             DBADDR localAddr = *paddr; /* Structure copy */
 
+            if (pfl->no_elements < 1) {
+                status = S_db_badField;
+                goto done;
+            }
+
             localAddr.field_type = pfl->field_type;
             localAddr.field_size = pfl->field_size;
             localAddr.no_elements = pfl->no_elements;

Replies:
[Merge] ~dirk.zimoch/epics-base:emptyArrayCrashFix into epics-base:3.15 noreply--- via Core-talk

Navigate by Date:
Prev: Re: [Merge] ~dirk.zimoch/epics-base:dbChannelForDBLinks into epics-base:7.0 Dirk Zimoch via Core-talk
Next: Re: [Merge] ~dirk.zimoch/epics-base:dbChannelForDBLinks into epics-base:7.0 Dirk Zimoch via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Jenkins build is back to stable : epics-base-3.15-test #170 APS Jenkins via Core-talk
Next: [Merge] ~dirk.zimoch/epics-base:emptyArrayCrashFix into epics-base:3.15 noreply--- via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 20 Mar 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·