From owner-cvs-all@FreeBSD.ORG Fri May 23 05:01:29 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62B08106564A; Fri, 23 May 2008 05:01:29 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3EF0D8FC20; Fri, 23 May 2008 05:01:29 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4N51TrO038798; Fri, 23 May 2008 05:01:29 GMT (envelope-from cperciva@repoman.freebsd.org) Received: (from cperciva@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4N51Tc9038797; Fri, 23 May 2008 05:01:29 GMT (envelope-from cperciva) Message-Id: <200805230501.m4N51Tc9038797@repoman.freebsd.org> From: Colin Percival Date: Fri, 23 May 2008 05:01:29 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libarchive archive_read_data_into_fd.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 May 2008 05:01:29 -0000 cperciva 2008-05-23 05:01:29 UTC FreeBSD src repository Modified files: lib/libarchive archive_read_data_into_fd.c Log: Check that lseek(2) succeeds and puts us where we expect. [1] While we're here, fix a long-standing bug in the handling of write(2) errors: The API changed from "return # of bytes written" to "return status code" almost 4 years ago, so instead of returning (-1) we need to return ARCHIVE_FATAL. Found by: Coverity Prevent [1] Revision Changes Path 1.16 +7 -3 src/lib/libarchive/archive_read_data_into_fd.c