On 6/27/05, Paul Slootman <[EMAIL PROTECTED]> wrote: > On Mon 27 Jun 2005, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote: > > In article <[EMAIL PROTECTED]> (at Mon, 27 Jun 2005 00:07:19 -0600), Andrew > > Shewmaker <[EMAIL PROTECTED]> 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".
Ahh, thanks Yoshfugi. I thought I had checked that file->u.sum was an unsigned character array. Also, thank you, Paul, for pointing out my snprintf mistake. -- Andrew Shewmaker -- To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html