Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Negative Character Value  at host.c:858

Categories: LANG.TYPE.NEGCHAR CWE:119 CWE:686
Warning ID: 2410.2425
Procedure: readhostfile
Trace: View
Modified: Wed Sep 2 12:37:09 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
   /u1/paul/SATE/2010/c/pvm/pvm3/src/host.c
   Enter readhostfile
 848  
 849         if (!(ff = fopen(fn, "r"))) {
 850                 pvmlogprintf("readhostfile() %s: can't read\n", fn);
 851                 goto bail;
 852         }
 853  
 854         /* parse each line of host file */ 
 855  
 856         while (fgets(buf, sizeof(buf), ff)) {
 857                 lnum++;
Type is char or signed char858                 for (p = buf; *p && isspace(*p); p++);     /* Negative Character Value */
 859  
 860                 if (!*p || *p == '#')   /* leading '#' is comment */ 
 861                         continue;
 862  
 863                 if (lnum > maxhostid) {
 864                         pvmlogprintf("readhostfile() %s: too many lines\n", fn);
 865                         err++;
 866                         break;
 867                 }
 868                 hp = hd_new(lnum);




Change Warning 2410.2425 : Negative Character Value

Priority:
State:
Finding:
Owner:
Note: