Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Negative Character Value  at pvmcruft.c:670

Categories: MISC.NEGCHAR CWE:119 CWE:686
Warning ID: 7.28580
Procedure: pvmstrtoi
Trace: view
Modified: Thu Nov 26 11:26:13 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/pvmcruft.c
   Enter pvmstrtoi
 660 int 
 661 pvmstrtoi(p) 
 662         char *p;
 663 {
 664         int i = 0;
 665         char c;
 666  
 667         if (*p == '0') {
 668                 p++;
 669                 if (*p == 'x' || *p == 'X')
Type is char or signed char670                         while (isxdigit(c = *++p))     /* Negative Character Value */
 671                                 i = (i << 4) + c 
 672                                                 - (isdigit(c) ? '0' : (isupper(c) ? 'A' : 'a') - 10);   /* Negative Character Value (ID: 8.28582) */
 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  




Change Warning 7.28580 : Negative Character Value

Priority:
State:
Finding:
Owner:
Note: