From owner-cvs-src-old@FreeBSD.ORG Sat Nov 7 17:29:21 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4146210656A3 for ; Sat, 7 Nov 2009 17:29:21 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2F8AE8FC0A for ; Sat, 7 Nov 2009 17:29:21 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7HTLe0040116 for ; Sat, 7 Nov 2009 17:29:21 GMT (envelope-from rnoland@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nA7HTLpG040115 for cvs-src-old@freebsd.org; Sat, 7 Nov 2009 17:29:21 GMT (envelope-from rnoland@repoman.freebsd.org) Message-Id: <200911071729.nA7HTLpG040115@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rnoland@repoman.freebsd.org using -f From: Robert Noland Date: Sat, 7 Nov 2009 17:29:03 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/geom/part g_part_gpt.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Nov 2009 17:29:21 -0000 rnoland 2009-11-07 17:29:03 UTC FreeBSD src repository Modified files: sys/geom/part g_part_gpt.c Log: SVN rev 199017 on 2009-11-07 17:29:03Z by rnoland Fix handling of GPT headers when size is > 92 bytes. It is valid for an on-disk GPT header to report a header size which is greater than 92 bytes. Previously, we would read in the sector and copy only the 92 bytes that we know how to deal with before calculating the checksum for comparison. This meant that when we did the checksum, we overshot the buffer and took in random memory, so the checksum would fail. We now determine the size of the header and allocate enough space to preserve the entire on-disk contents. This allows us to be correctly calculate the checksum and be able to modify and write the header back to the disk, while preserving data that we might not understand. Reported by: Kris Weston Approved by: marcel@ MFC after: 2 weeks Revision Changes Path 1.19 +92 -67 src/sys/geom/part/g_part_gpt.c