On Mon, Sep 3, 2018 at 7:53 AM, Denis Buga <bugade...@gmail.com> wrote:
> 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


Your code has no case statement, so it's equivalent to just removing
the switch block and only keeping the code in the default case.

Add any case statement you like and you should get the segfault you're
looking for...

Reply via email to