79126853

Date: 2024-10-25 18:08:08
Score: 3
Natty:
Report link

The answer is no it is not save to return the struct. The struct itself is a copy so it it safe to return but in the struct is a PWSTR aka a char* and that pointer points to an area in the byte* (just after the array of structs) which is not valid after the function returns.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: MCPC10