Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Null Pointer Dereference  at lpvmpack.c:1735

Categories: LANG.MEM.NPD CWE:476
Warning ID: 22122.29081
Procedure: pvmupkstralloc
Trace: view
Modified: Thu Nov 26 11:31:10 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
ProblemLineSource
   /kat0/fletcher/SATE/2010/pvm3/src/lpvmgen.c
   Enter pvm_config
 2022 pvm_config(nhostp, narchp, hostp) 
 2023         int *nhostp;
 2024         int *narchp;
 2025         struct pvmhostinfo **hostp;
 2026 {
 2027         int sbf, rbf, cc;
 2028         static int nhost = 0;
 2029         static int narch = 0;
 2030         static struct pvmhostinfo *hlist = 0;
 2031         int i;
 2032         /* char buf[256]; XXX static limit, argh (Not Any More! :-) JAK */ 
 2033         TEV_DECLS 
 2034  
 2035         if (TEV_EXCLUSIVE) {
 2036                 if (TEV_DO_TRACE(TEV_CONFIG,TEV_EVENT_ENTRY))
 2037                         TEV_FIN;
 2038         }
 2039  
 2040         if (hlist) {
 2041                 while (nhost-- > 0) {
 2042                         PVM_FREE(hlist[nhost].hi_name);
 2043                         PVM_FREE(hlist[nhost].hi_arch);
 2044                 }
 2045                 PVM_FREE(hlist);
 2046                 hlist = 0;
 2047                 nhost = 0;
 2048         }
 2049         if (!(cc = BEATASK)) {
 2050                 sbf = pvm_setsbuf(pvm_mkbuf(PvmDataFoo));
 2051                 rbf = pvm_setrbuf(0);
 2052                 if (pvmschedtid)
 2053                         cc = msendrecv(pvmschedtid, SM_CONFIG, PvmBaseContext);
 2054                 else 
 2055                         cc = msendrecv(TIDPVMD, TM_CONFIG, SYSCTX_TM);
 2056                 if (cc > 0) {
 2057                         pvm_upkint(&nhost, 1, 1);
 2058                         pvm_upkint(&narch, 1, 1);
true2059                         hlist = TALLOC(nhost, struct pvmhostinfo, "hi");   /* Integer Overflow of Allocation Size (ID: 22121.29080) */
hlist <= 40872060                         for (i = 0; i < nhost; i++) {
$unknown_22818073 <= 40952061                                 pvm_upkint(&hlist[i].hi_tid, 1, 1);
$unknown_22818105 <= 40952062                                 pvmupkstralloc(&(hlist[i].hi_name));
$unknown_22818121 <= 40952063                                 pvmupkstralloc(&(hlist[i].hi_arch));
     /kat0/fletcher/SATE/2010/pvm3/src/lpvmpack.c
     Enter pvm_config / pvmupkstralloc
 1724   pvmupkstralloc(ss) 
 1725           char **ss;                              /* return pointer */ 
 1726   {
 1727           int cc;
 1728           int l;
 1729    
 1730           if (!pvmrbuf)
 1731                   cc = PvmNoBuf;
 1732           else {
 1733                   if (!(cc = (pvmrbuf->m_codef->dec_int)
 1734                                   (pvmrbuf, (void*)&l, 1, 1, sizeof(int)))) {
ss <= 40951735                           *ss = TALLOC(l, char, "pustr");     /* Null Pointer Dereference */  /* 3 more... */
     Exit pvm_config / pvmupkstralloc
Preconditions
&$unknown_3323409 >= 1
&$unknown_3323410 != 0
&$unknown_3323411 >= 1
hlist = 0
pvmautoerr != 0
pvmautoerr != 2
pvmautoerr != 3
pvmmytid != -1
pvmschedtid = 0
pvmtoplvl = 0
Postconditions
cc' = &$unknown_3323409
cc' = 0
errno' != 0
hlist' = 0
i' = 0
nextwaitid' = nextwaitid + 1
nhost' = &$unknown_3323411
pvm_errno' = -2
pvmampushed' = 0
pvmamtraced' = pvmtoplvl
pvmrbuf' = &$unknown_3323410
rbf' = pvmrbuf->m_mid
sbf' = -2
ss' = 8




Change Warning 22122.29081 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: