Text  |   XML   |   Visible Warnings:

pvm3.4.6 : pvm3.4.6 analysis 2 : Negative Character Value  at cons.c:623

Categories: MISC.NEGCHAR CWE:119 CWE:686
Warning ID: 16.28597
Similar Warnings: 16.28598
Procedure: xtoi
Trace: view
Modified: Thu Nov 26 11:26:26 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/console/cons.c
   Enter xtoi
 613 *       Yet another version of ascii hex to integer 
 614 */ 
 615  
 616 xtoi(p) 
 617         char *p;
 618 {
 619         int i = 0;
 620         char c;
 621  
 622         while (isxdigit(c = *p++)) {   /* Negative Character Value (ID: 15.28596) */
Type is char or signed char623                 i = (i << 4) + c - (isdigit(c) ? '0' : (isupper(c) ? 'A' : 'a') - 10);     /* Negative Character Value */
 624         }
 625         return i;
 626 } 
 627  
 628  
 629 /*      axtoi()
 630 *
 631 *       ascii hex or decimal to integer.
 632 */ 
 633  




Change Warning 16.28597 : Negative Character Value

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

Priority:
State:
Finding:
Owner:
Note: