Text  |   XML   |   Visible Warnings:

Pvm : Pvm analysis 1 : Negative Character Value  at pvmcruft.c:672

Categories: LANG.TYPE.NEGCHAR CWE:119 CWE:686
Warning ID: 2417.2433
Similar Warnings: 2417.2434
Procedure: pvmstrtoi
Trace: View
Modified: Wed Sep 2 12:37:19 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/pvmcruft.c
   Enter pvmstrtoi
 662         char *p;
 663 {
 664         int i = 0;
 665         char c;
 666  
 667         if (*p == '0') {
 668                 p++;
 669                 if (*p == 'x' || *p == 'X')
 670                         while (isxdigit(c = *++p))   /* Negative Character Value (ID: 2416.2432) */
 671                                 i = (i << 4) + c 
Type is char or signed char672                                                 - (isdigit(c) ? '0' : (isupper(c) ? 'A' : 'a') - 10);     /* Negative Character Value */
 673                 else 
 674                         while (c = *p++, c >= '0' && c <= '7')
 675                                 i = (i << 3) + c - '0';
 676                 return i;
 677         } else 
 678                 return (int)atoi(p);
 679 
 680  
 681  
 682 #ifndef I860_NODE 




Change Warning 2417.2433 : Negative Character Value

Because they are very similar, this warning shares annotations with warning 2417.2434.

Priority:
State:
Finding:
Owner:
Note: