Multiple choice technology security

What vulnerability is present in following code: unsigned char j,k; j=getchar(); k=getchar(); unsigned char result = j + k;

  1. Heap Overflow

  2. Integer overflow

  3. Buffer overflow

  4. No Vulnerability

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

j and k are unsigned char (0-255). Adding two can exceed 255, wrapping around due to integer overflow. Example: j=200, k=100 gives result=44 (not 300). This is an arithmetic overflow, not a buffer overflow or heap issue.