From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jacob Burckhardt Newsgroups: gmane.emacs.bugs Subject: bug#16686: 23.1; hexl-insert-hex-char shortens file by 7 bytes Date: Fri, 7 Feb 2014 17:42:45 -0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1391826024 17803 80.91.229.3 (8 Feb 2014 02:20:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 8 Feb 2014 02:20:24 +0000 (UTC) To: 16686@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 08 03:20:30 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WBxWr-0001N4-Pz for geb-bug-gnu-emacs@m.gmane.org; Sat, 08 Feb 2014 03:20:26 +0100 Original-Received: from localhost ([::1]:44544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBxWr-0006EV-CW for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Feb 2014 21:20:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBxWd-0006DI-P3 for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2014 21:20:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBxWU-00085M-BN for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2014 21:20:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBxWU-000855-8M for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2014 21:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WBxWU-00086t-0R for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2014 21:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jacob Burckhardt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Feb 2014 02:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16686 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.139182596931121 (code B ref -1); Sat, 08 Feb 2014 02:20:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Feb 2014 02:19:29 +0000 Original-Received: from localhost ([127.0.0.1]:55642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WBxVv-00085s-Vb for submit@debbugs.gnu.org; Fri, 07 Feb 2014 21:19:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39950) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WBxQ2-0007up-4c for submit@debbugs.gnu.org; Fri, 07 Feb 2014 21:13:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBxPs-0006WR-Ke for submit@debbugs.gnu.org; Fri, 07 Feb 2014 21:13:21 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBxPs-0006WM-I2 for submit@debbugs.gnu.org; Fri, 07 Feb 2014 21:13:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBxPl-0005RP-8g for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2014 21:13:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBxPd-0006Vs-VY for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2014 21:13:05 -0500 Original-Received: from am1ehsobe005.messaging.microsoft.com ([213.199.154.208]:3662 helo=am1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBxPd-0006Vk-Mp for bug-gnu-emacs@gnu.org; Fri, 07 Feb 2014 21:12:57 -0500 Original-Received: from mail66-am1-R.bigfish.com (10.3.201.239) by AM1EHSOBE025.bigfish.com (10.3.207.147) with Microsoft SMTP Server id 14.1.225.22; Sat, 8 Feb 2014 01:42:48 +0000 Original-Received: from mail66-am1 (localhost [127.0.0.1]) by mail66-am1-R.bigfish.com (Postfix) with ESMTP id 1A039180C6F for ; Sat, 8 Feb 2014 01:42:48 +0000 (UTC) X-Forefront-Antispam-Report: CIP:66.45.50.94; KIP:(null); UIP:(null); IPV:NLI; H:EXCHANGE1.pdvcorp.com; RD:exchange1.pdvcorp.com; EFVD:NLI X-SpamScore: 3 X-BigFish: VPS3(zzzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah21bch1fc6hzzz2fh109h839h944ha12hd25hd2bhf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h14ddh1504h1537h153bh15d0h162dh1631h1758h184fh18e1h1946h19b5h1b0ah224fh1c24h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e1dh1fe8h2216h2336h2438h2461h2487h24d7h2516h2545h122ck1155h) Received-SPF: pass (mail66-am1: domain of pdvcorp.com designates 66.45.50.94 as permitted sender) client-ip=66.45.50.94; envelope-from=jburckhardt@pdvcorp.com; helo=EXCHANGE1.pdvcorp.com ; .pdvcorp.com ; Original-Received: from mail66-am1 (localhost.localdomain [127.0.0.1]) by mail66-am1 (MessageSwitch) id 1391823767106839_20585; Sat, 8 Feb 2014 01:42:47 +0000 (UTC) Original-Received: from AM1EHSMHS015.bigfish.com (unknown [10.3.201.233]) by mail66-am1.bigfish.com (Postfix) with ESMTP id 166F44C0064 for ; Sat, 8 Feb 2014 01:42:47 +0000 (UTC) Original-Received: from EXCHANGE1.pdvcorp.com (66.45.50.94) by AM1EHSMHS015.bigfish.com (10.3.207.153) with Microsoft SMTP Server id 14.16.227.3; Sat, 8 Feb 2014 01:42:46 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-Class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: 23.1; hexl-insert-hex-char shortens file by 7 bytes Thread-Index: Ac8kbvP12Ib79kgTS7aY3xtPP87QSg== X-OriginatorOrg: pdvcorp.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Fri, 07 Feb 2014 21:19:26 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:84848 Archived-At: hexl-insert-hex-char is supposed to change a character meaning the file size should remain the same. But it actually deletes 7 bytes from the file. Here is how to reproduce it: * In the shell, I ran: env printf '\xee\x00\x4a\x7b\x30\x90\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0 0\x00\x00\x00\x00\x00' >! /tmp/testfile * In the shell, I ran "env ls -l /tmp/testfile". It output: -rw-r--r-- 1 jburckhardt jburckhardt 23 Feb 7 17:27 /tmp/testfile * emacs -q /tmp/testfile & * M-x hexl-mode * M-x hexl-insert-hex-char * ff * C-x C-s * Type 'y' to acknowledge the warning about loss of undo info. * In the shell, I ran "env ls -l /tmp/testfile". It output: -rw-r--r-- 1 jburckhardt jburckhardt 16 Feb 7 17:29 /tmp/testfile Notice that the first ls command said 23 bytes, but the last ls command said 16 bytes. So it lost 7 bytes. The second ls command should have also said 23 bytes. This happened on GNU Emacs 23.1.1 on a machine whose "uname -a" says: Linux bb003-centos-02 2.6.32-358.14.1.el6.x86_64 #1 SMP Tue Jul 16 23:51:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux -Jacob