The CVS build gives the following output on a 128-byte file named tst:
$ md5deep -p64 <tst
3a1f1394df3d94828c9e20de752ad889 stdin offset 0-0
8ebc94056b9bf03c3f55464964d14c2a stdin offset 64-0
d41d8cd98f00b204e9800998ecf8427e stdin offset 128-0
After applying the attached patch, the output is as follows:
$ md5deep/md5deep -p64 <tst
3a1f1394df3d94828c9e20de752ad889 stdin offset 0-64
8ebc94056b9bf03c3f55464964d14c2a stdin offset 64-128
d41d8cd98f00b204e9800998ecf8427e stdin offset 128-128
This patch stores the bytes read before computing the hash, and delays
naming the file until after computed. That allows the true bytes read to
be used, permitting correct display when stdin is used.
Nobody/Anonymous ( nobody ) - 2009-09-09 20:59
5
Closed
Fixed
Jesse Kornblum
cosmetic
None
Public
|
Date: 2009-09-29 12:55 The fix checked into SVN has passed testing and is accepted. |
|
Date: 2009-09-25 16:06 It works under my test environment. And the last block is omitted as you |
|
Date: 2009-09-24 10:38 petiepooo, can you please test out the 'fixed' version now in SVN? (I put |
|
Date: 2009-09-24 10:36 After thinking more about the issue, I've added a 'last block' check that |
|
Date: 2009-09-18 13:50 Oh, and the bug title should say piecemeal instead of progressive. I had |
|
Date: 2009-09-18 13:49 A correction: in my progressive example below, I meant to use -g512 instead |
|
Date: 2009-09-10 16:11 After reviewing your revised patch, I'd recommend not subtracting one from |
|
Date: 2009-09-10 15:49 You're welcome. I realize now I hadn't logged in before submitting the |
|
Date: 2009-09-09 23:35 Also, an important note, the project is using Subversion (SVN) now instead |
|
Date: 2009-09-09 21:47 I have edited the patch to simplify the overall logic, but this appears to |
|
Date: 2009-09-09 21:28 I have verified the issue and am testing the patch. |
| Filename | Description | Download |
|---|---|---|
| revised-patch.txt | Revised patch for common/hash.c | Download |
| hash-stdin.patch | Patch for md5deep/hash.c | Download |
| Field | Old Value | Date | By |
|---|---|---|---|
| close_date | - | 2009-09-29 12:55 | jessekornblum |
| allow_comments | 1 | 2009-09-29 12:55 | jessekornblum |
| status_id | Open | 2009-09-29 12:55 | jessekornblum |
| summary | Ending offset in progressive mode wrong if using stdin | 2009-09-24 10:38 | jessekornblum |
| resolution_id | None | 2009-09-24 10:37 | jessekornblum |
| File Added | 342383: revised-patch.txt | 2009-09-09 21:46 | jessekornblum |
| assigned_to | nobody | 2009-09-09 21:28 | jessekornblum |
| File Added | 342379: hash-stdin.patch | 2009-09-09 20:59 | nobody |