> This is user-space libbpf code, where the API contract mandates that > the path argument is a well-formed zero-terminated C string. Plus, if > you look at the few lines above, we allocate just enough space to fit > the entire contents of the string without truncation. > > In other words, there is nothing to fix or improve here. > Even though it’s safe in this context, would it still be a good idea to replace strcpy() with something like memcpy() since it's deprecated? I’m still a beginner in kernel development and trying to find my way around, so I’d appreciate any guidance.