adding a new log-format escape
Paul Slootman
paul at debian.org
Mon Jun 27 12:13:52 GMT 2005
On Mon 27 Jun 2005, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
> In article <f4050c9e050626230758147067 at mail.gmail.com> (at Mon, 27 Jun 2005 00:07:19 -0600), Andrew Shewmaker <agshew at gmail.com> says:
>
> > + for (j = 0; j < SUM_LENGTH; j++ ) {
> > + snprintf(buf2 + j * 2, sizeof buf2,
> > fmt, file->u.sum[j]);
>
> file->u.sum[j] & 0xff
>
> > + for (j = 0; j < b; j++ ) {
> > + snprintf(buf2 + j * 2, sizeof buf2,
> > fmt, file->u.sum[j]);
>
> ditto.
Note also that to preserve the "protection" offered by snprintf, the
"sizeof buf2" needs to be changed to "sizeof buf2 - j * 2".
Paul Slootman
More information about the rsync
mailing list