[scponly] scponly 3.11 various bug fixes - patch released.

Thomas Wana thomas at wana.at
Wed May 26 03:36:59 EDT 2004


Am Mittwoch, 26. Mai 2004 00:18 schrieb David Ramsden:
>
> [1] http://david.hexstream.eu.org/scponly-3.11-bugfixes.patch
...
> snprintf(chng_dir, FILENAME_MAX, root_dir + 1, strlen(root_dir));

Just a note, don't use string constants as format strings.
While this is no format string bug here, this is the typical
source of format string bugs. Someone changes something
here in the future and *bang*.

Additionally, the strlen(root_dir) at the end is unneccessary.

Instead, use

snprintf(chng_dir, FILENAME_MAX, "%s", root_dir + 1);

Tom

>
> Hope this helps everyone.
> Regards,
> David.



More information about the scponly mailing list