I quiet do not understand why I get error "Stack around the variable "tmp" was corrupted".

I use same code in different functions and it works well but now when function is "returning" it throws error mentioned above.

```
struct frame {
   uint8_t dst[6]; 
   uint8_t src[6];    
};

//fill frame.dst || src exactly same way as code below without any errors or warnings

bool fcn() {

    uint8_t tmp[6];

    sscanf_s("00-00-00-00-00-00", "%x-%x-%x-%x-%x-%x", &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]);
    //here I compare tmp[0] == frame.mac[0]...
    return true; 
} //here pops the error while debugging

```

I use exactly same code in different part of the program but no error what so ever.