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

David Ramsden david at hexstream.eu.org
Wed May 26 04:06:51 EDT 2004


On Wed, May 26, 2004 at 09:36:59AM +0200, Thomas Wana wrote:
> 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*.
> 

Sorry. My bad. That was ment to look more like your line (below), with a
format string in there!
Thanks for finding that :-)

> Additionally, the strlen(root_dir) at the end is unneccessary.
> 
> Instead, use
> 
> snprintf(chng_dir, FILENAME_MAX, "%s", root_dir + 1);
> 
[snip]

I've updated my patch, just in case anyone wishes to use it!
Much appreciated Tom. As I said, I'm not a great C programmer but I "get
by" :)

If anyone has the time, maybe scponly should be run through `splint' to
check for any programming errors. Just a thought.

Kind regards.
David.
-- 
 .''`.     David Ramsden <david at hexstream.eu.org>
: :'  :    http://david.hexstream.eu.org/
`. `'`     PGP key ID: 507B379B on wwwkeys.pgp.net
  `-  Debian - when you have better things to do than to fix a system.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : https://lists.ccs.neu.edu/pipermail/scponly/attachments/20040526/d173c738/attachment.bin


More information about the scponly mailing list