Multiple choice technology security

From security view point what is problem with code below try { //code to do IO operations return var1; } Catch(Exception e) { return var2; } finally{ return var3; }

  1. It is returning a value in finally block

  2. It is catching Exception

  3. OPTION 1 AND Option 2

  4. Nothing is wrong

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

Returning from finally blocks is dangerous because it discards any pending exceptions from try or catch blocks and creates confusing control flow. It also swallows the original return values.