Text  |   XML   |   Visible Warnings:

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

Categories: LANG.TYPE.NEGCHAR CWE:119 CWE:686
Warning ID: 2414.2429
Procedure: pvmxtoi
Trace: View
Modified: Wed Sep 2 12:37:17 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 pvmxtoi
 638  */ 
 639  
 640 pvmxtoi(p) 
 641         char *p;
 642 {
 643         int i = 0;
 644         char c;
 645  
 646         if (p[0] == '0' && (p[1] == 'x' || p[1] == 'X'))   /* Null Pointer Dereference (ID: 2740.2795) */  /* 5 more... */
 647                 p += 2;
Type is char or signed char648         while (isxdigit(c = *p++)) {     /* Negative Character Value */
 649                 i = (i << 4) + c - (isdigit(c) ? '0' : (isupper(c) ? 'A' : 'a') - 10);   /* Negative Character Value (ID: 2415.2430) */
 650         }
 651         return i;
 652 
 653  
 654  
 655 /*      pvmstrtoi()
 656  *
 657  *      Convert string in decimal, hex or octal to integer.
 658  */ 




Change Warning 2414.2429 : Negative Character Value

Priority:
State:
Finding:
Owner:
Note: