Monday, September 03, 2018

cc: dereference NULL pointer inside switch brackets and no exception

int main()
{
char * ptr = NULL;
switch( *ptr )
{
default:
fprintf(stderr,

"where is exception ? default label exist for"
"exclusive value, not for non-existent ! "

"it can be security issue, when dereferencing NULL "
"in switch formally pass and we go to default label\n");
} }

No ?

6.3 GENERIC.MP#8 amd64

No comments:

Post a Comment