3 ms·
sprintf(&CMD_BUF,"echo admin:%s > %s",pass1,path); system(&CMD_BUF); You've probably heard of useless use of cat, but this is a useless use of echo. Given
by userbinator 3y ago
sprintf(&CMD_BUF,"echo admin:%s > %s",pass1,path);
system(&CMD_BUF);
You've probably heard of useless use of cat, but this is a useless use of echo. Given that the code even opens the file in question several lines above, I'm surprised that the author didn't know about fprintf.