The buffer is a fixed size stack variable, and the code just strcpy's it in there, without checking the length. In regular use, I imagine this will never come up (as 255 must be approaching Windows maximum path length), but maybe someone exposes this to users (perhaps to allow mods) and then this is suddenly a vulnerability vector (someone downloads a malicious mod that can suddenly run arbitrary code). A longshot I know, but I'd feel wrong not pointing it out, even if it is a bit nitpicky.
The code in question.
The buffer is a fixed size stack variable, and the code just
strcpy
's it in there, without checking the length. In regular use, I imagine this will never come up (as 255 must be approaching Windows maximum path length), but maybe someone exposes this to users (perhaps to allow mods) and then this is suddenly a vulnerability vector (someone downloads a malicious mod that can suddenly run arbitrary code). A longshot I know, but I'd feel wrong not pointing it out, even if it is a bit nitpicky.