svn commit: r184779 - head/usr.sbin/cron/crontab
Kostik Belousov
kostikbel at gmail.com
Sun Nov 9 06:38:25 PST 2008
On Sun, Nov 09, 2008 at 03:20:26PM +0200, Kostik Belousov wrote:
> On Sun, Nov 09, 2008 at 06:44:53AM +0000, Matteo Riondato wrote:
> > Author: matteo
> > Date: Sun Nov 9 06:44:53 2008
> > New Revision: 184779
> > URL: http://svn.freebsd.org/changeset/base/184779
> >
> > Log:
> > Be paranoid and use snprintf
> >
> > PR: bin/122137
> > Submitted by: Steven Kreuzer <skreuzer at exit2shell.com>
> > MFC after: 3 days
> >
> > Modified:
> > head/usr.sbin/cron/crontab/crontab.c
> >
> > Modified: head/usr.sbin/cron/crontab/crontab.c
> > ==============================================================================
> > --- head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 01:53:06 2008 (r184778)
> > +++ head/usr.sbin/cron/crontab/crontab.c Sun Nov 9 06:44:53 2008 (r184779)
> > @@ -263,7 +263,7 @@ list_cmd() {
> > FILE *f;
> >
> > log_it(RealUser, Pid, "LIST", User);
> > - (void) sprintf(n, CRON_TAB(User));
> > + (void) snprintf(n, sizeof(n), CRON_TAB(User));
> This note is probably also about paranoia instead of exploitable bug.
> I think that it is better to use %s format explicitely instead of
> expecting no '%' in the CRON_TAB(User).
Please, ignore this. I should have looked at the actual code.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20081109/24a47de6/attachment.pgp
More information about the svn-src-all
mailing list