Date: Sat, 23 Aug 2008 09:55:44 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 148161 for review Message-ID: <200808230955.m7N9tirJ064700@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=148161 Change 148161 by hselasky@hselasky_laptop001 on 2008/08/23 09:55:03 Use snprintf instead of sprintf. Affected files ... .. //depot/projects/usb/src/sys/dev/usb2/storage/ustorage2_fs.c#7 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb2/storage/ustorage2_fs.c#7 (text+ko) ==== @@ -983,7 +983,11 @@ buf[4] = 31; /* Additional length */ /* No special options */ - sprintf(buf + 8, "%-8s%-16s%04x", vendor_id, product_id, + /* + * NOTE: We are writing an extra zero here, that is not + * transferred to the peer: + */ + snprintf(buf + 8, 28 + 1, "%-8s%-16s%04x", vendor_id, product_id, USTORAGE_FS_RELEASE); return (ustorage_fs_min_len(sc, 36, 0 - 1)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808230955.m7N9tirJ064700>