OSSP CVS Repository

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

Check-in Number: 3397
Date: 2003-May-28 16:40:25 (local)
2003-May-28 14:40:25 (UTC)
User:ms
Branch:
Comment: Bug fix memory problems found by Solaris.
Tickets:
Inspections:
Files:
ossp-pkg/rc/rc_proc.c      1.38 -> 1.39     3 inserted, 1 deleted

ossp-pkg/rc/rc_proc.c 1.38 -> 1.39

--- rc_proc.c    2003/05/27 13:00:22     1.38
+++ rc_proc.c    2003/05/28 14:40:25     1.39
@@ -116,7 +116,9 @@
         pRc->m_ppLabvec[nRc] = labelNew(pRc->m_pAnal->m_szRcs[nRc]);
 
         /* Build the path name */
-        szLocex = (char *)malloc(strlen(pRc->m_pAnal->m_szLocs) + strlen(pRc->m_pAnal->m_szRcs[nRc]) + 2);
+        szLocex = (char *)malloc(strlen(pRc->m_pAnal->m_szLocs) + \
+                                 strlen(pRc->m_pAnal->m_szRcs[nRc]) + \
+                                 strlen("rc.") + 1);
         strcpy(szLocex, pRc->m_pAnal->m_szLocs);
         strcat(szLocex, "rc."); /* FIXME: Make the prefix configurable */
         strcat(szLocex, pRc->m_pAnal->m_szRcs[nRc]);

CVSTrac 2.0.1