OSSP CVS Repository

ossp - Check-in [3418]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3418
Date: 2003-Jun-03 17:26:52 (local)
2003-Jun-03 15:26:52 (UTC)
User:ms
Branch:
Comment: Fixed non terminal section bug causing segfault in processor
Tickets:
Inspections:
Files:
ossp-pkg/rc/rc_lab.c      1.2 -> 1.3     1 inserted, 0 deleted
ossp-pkg/rc/rc_proc.c      1.40 -> 1.41     2 inserted, 1 deleted

ossp-pkg/rc/rc_lab.c 1.2 -> 1.3

--- rc_lab.c     2003/05/20 15:06:41     1.2
+++ rc_lab.c     2003/06/03 15:26:52     1.3
@@ -67,6 +67,7 @@
     pLabel->m_ppSecvec = realloc(pLabel->m_ppSecvec, sizeof(rc_section_t *)\
         * (pLabel->m_nSecs + 1));
     pLabel->m_ppSecvec[pLabel->m_nSecs] = sectionNew(pInsec->m_szName);
+    pLabel->m_ppSecvec[pLabel->m_nSecs + 1] = NULL;
 
     /* Simple value copy */
     pLabel->m_ppSecvec[pLabel->m_nSecs]->m_nPri  = pInsec->m_nPri;


ossp-pkg/rc/rc_proc.c 1.40 -> 1.41

--- rc_proc.c    2003/05/28 15:09:29     1.40
+++ rc_proc.c    2003/06/03 15:26:52     1.41
@@ -270,7 +270,8 @@
         /* code is used in the script sections to be executed               */
         for (nSecs = 0; nSecs < pRc->m_pAnal->m_nSecs; nSecs++) {
             for (nTmp = 0; nTmp < pRc->m_pAnal->m_nRcs; nTmp++) {
-                if (pRc->m_ppLabvec[nTmp]->m_ppSecvec) {
+                if (pRc->m_ppLabvec[nTmp]->m_ppSecvec && \
+                    pRc->m_ppLabvec[nTmp]->m_ppSecvec[nSecs]) {
                     nRunuid = getuid();
                     nSectuid = pRc->m_ppLabvec[nTmp]->m_ppSecvec[nSecs]->m_nUid;
                     /* See if root user status is needed, and bail out if so */

CVSTrac 2.0.1