Author: dumbbell Date: Tue Mar 5 11:02:05 2013 New Revision: 247837 URL: http://svnweb.freebsd.org/changeset/base/247837
Log: g_label_ntfs.c: Mark structures as __packed Without this, read data is mis-interpreted. This could trigger a panic, as was the case on one computer where computed "recsize" was zero, leading to a call to g_read_page() asking for 0 bytes. Modified: head/sys/geom/label/g_label_ntfs.c Modified: head/sys/geom/label/g_label_ntfs.c ============================================================================== --- head/sys/geom/label/g_label_ntfs.c Tue Mar 5 10:18:48 2013 (r247836) +++ head/sys/geom/label/g_label_ntfs.c Tue Mar 5 11:02:05 2013 (r247837) @@ -55,7 +55,7 @@ struct ntfs_attr { uint16_t reserved3; uint16_t a_dataoff; uint16_t a_indexed; -}; +} __packed; struct ntfs_filerec { uint32_t fr_hdrmagic; @@ -70,7 +70,7 @@ struct ntfs_filerec { uint32_t fr_allocated; uint64_t fr_mainrec; uint16_t fr_attrnum; -}; +} __packed; struct ntfs_bootfile { uint8_t reserved1[3]; @@ -89,7 +89,7 @@ struct ntfs_bootfile { uint8_t bf_mftrecsz; uint32_t bf_ibsz; uint32_t bf_volsn; -}; +} __packed; static void g_label_ntfs_taste(struct g_consumer *cp, char *label, size_t size) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"