dolf (Community Member) asked a question.

how to resolve CWE ID 191 error

hello all,

I have a medium warning in line 133, Integer Underflow (Wrap or Wraparound) (CWE ID 191)(2 flaws)

 

line#: 133

Flow ID: 45 and 46

Module#: 2

 

code snippet:

 

23 uint8_t dmap_get_bits_byte, dmap_bits_gotten, dmap_put_bits_byte, dmap_bits_putted;

124 long ltmp;

133 dmap_put_bits_byte = (dmap_put_bits_byte << 1) | ((ltmp & 0x80000000L) ? (uint8_t)1 : (uint8_t)0);

 

your help is much appreciated.

Dolf


  • Anthony Fielding (Veracode)

    Hello @dolf (Community Member)​,

    Thank you for your question. Can you please share a link to the scan?

     

    Thanks,

    Anthony Fielding

Topics (2)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.