From owner-svn-src-stable-10@FreeBSD.ORG Sun Jun 21 07:00:55 2015 Return-Path: Delivered-To: svn-src-stable-10@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 100629BD; Sun, 21 Jun 2015 07:00:55 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7BA4951; Sun, 21 Jun 2015 07:00:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5L70sjM062012; Sun, 21 Jun 2015 07:00:54 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5L70sIP062011; Sun, 21 Jun 2015 07:00:54 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201506210700.t5L70sIP062011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 21 Jun 2015 07:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284674 - stable/10/usr.sbin/uefisign X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2015 07:00:55 -0000 Author: trasz Date: Sun Jun 21 07:00:54 2015 New Revision: 284674 URL: https://svnweb.freebsd.org/changeset/base/284674 Log: MFC r283141: Remove the warning about invalid PE checksum; apparently nothing cares about those checksums anyway. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/uefisign/pe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/uefisign/pe.c ============================================================================== --- stable/10/usr.sbin/uefisign/pe.c Sun Jun 21 06:57:40 2015 (r284673) +++ stable/10/usr.sbin/uefisign/pe.c Sun Jun 21 07:00:54 2015 (r284674) @@ -346,7 +346,9 @@ static void parse_optional_32_plus(struct executable *x, off_t off, int number_of_sections) { +#if 0 uint32_t computed_checksum; +#endif const struct pe_optional_header_32_plus *po; range_check(x, off, sizeof(*po), "PE Optional Header"); @@ -373,13 +375,13 @@ parse_optional_32_plus(struct executable #if 0 printf("checksum 0x%x at offset %zd, len %zd\n", po->po_checksum, x->x_checksum_off, x->x_checksum_len); -#endif computed_checksum = compute_checksum(x); if (computed_checksum != po->po_checksum) { warnx("invalid PE+ checksum; is 0x%x, should be 0x%x", po->po_checksum, computed_checksum); } +#endif if (x->x_len < x->x_headers_len) errx(1, "invalid SizeOfHeaders %d", po->po_size_of_headers); @@ -393,7 +395,9 @@ parse_optional_32_plus(struct executable static void parse_optional_32(struct executable *x, off_t off, int number_of_sections) { +#if 0 uint32_t computed_checksum; +#endif const struct pe_optional_header_32 *po; range_check(x, off, sizeof(*po), "PE Optional Header"); @@ -420,13 +424,13 @@ parse_optional_32(struct executable *x, #if 0 printf("checksum at offset %zd, len %zd\n", x->x_checksum_off, x->x_checksum_len); -#endif computed_checksum = compute_checksum(x); if (computed_checksum != po->po_checksum) { warnx("invalid PE checksum; is 0x%x, should be 0x%x", po->po_checksum, computed_checksum); } +#endif if (x->x_len < x->x_headers_len) errx(1, "invalid SizeOfHeaders %d", po->po_size_of_headers);