shortened form of data is inconsistent #1

Closed
opened 2024-02-01 22:40:44 +01:00 by PlexSheep · 0 comments
Owner
plex@theseus ...code/rs/hedu % cargo run -- data/256B-zero-with-trash.img -i /etc/passwd
   Compiling hedu v0.1.1 (/home/plex/Documents/code/rs/hedu)
    Finished dev [unoptimized + debuginfo] target(s) in 0.67s
     Running `target/debug/hedu data/256B-zero-with-trash.img -i`
────────────── data/256B-zero-with-trash.img ──────────────
DATA IDX │ DATA AS HEX
───────────────────────────────────────────────────────────
00000000 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000010 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000020 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000030 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000040 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000050 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000060 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000070 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000080 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
00000090 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
000000A0 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
000000B0 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
000000C0 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
000000D0 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
000000E0 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
000000F0 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
000000F8 │ 66 73 66 64 73 61 66 0A                          
───────────────────────────────────────────────────────────
00000108 │ read total:              264 B    (264 B)        

Note the last line which correctly has 8 bytes.

plex@theseus ...code/rs/hedu % cargo run -- data/256B-zero-with-trash.img
    Finished dev [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/hedu data/256B-zero-with-trash.img`
────────────── data/256B-zero-with-trash.img ──────────────
DATA IDX │ DATA AS HEX
───────────────────────────────────────────────────────────
00000000 │ 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00 
******** │ (repeats 248 lines)                              
000000F8 │ 00 00 00 00 00 00 00 00                          
───────────────────────────────────────────────────────────
00000108 │ read total:              264 B    (264 B)        

Note that in this version, the last 8 bytes are showed as null bytes wrongly.

  • last line all zeros
    • find source of this error
    • fix this
  • repeats x lines has wrong number (bytes instead of lines?)
``` plex@theseus ...code/rs/hedu % cargo run -- data/256B-zero-with-trash.img -i /etc/passwd Compiling hedu v0.1.1 (/home/plex/Documents/code/rs/hedu) Finished dev [unoptimized + debuginfo] target(s) in 0.67s Running `target/debug/hedu data/256B-zero-with-trash.img -i` ────────────── data/256B-zero-with-trash.img ────────────── DATA IDX │ DATA AS HEX ─────────────────────────────────────────────────────────── 00000000 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000020 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000030 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000040 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000050 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000060 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000070 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000080 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000090 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000000A0 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000000B0 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000000C0 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000000D0 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000000E0 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000000F0 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000000F8 │ 66 73 66 64 73 61 66 0A ─────────────────────────────────────────────────────────── 00000108 │ read total: 264 B (264 B) ``` Note the last line which correctly has 8 bytes. ``` plex@theseus ...code/rs/hedu % cargo run -- data/256B-zero-with-trash.img Finished dev [unoptimized + debuginfo] target(s) in 0.05s Running `target/debug/hedu data/256B-zero-with-trash.img` ────────────── data/256B-zero-with-trash.img ────────────── DATA IDX │ DATA AS HEX ─────────────────────────────────────────────────────────── 00000000 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ******** │ (repeats 248 lines) 000000F8 │ 00 00 00 00 00 00 00 00 ─────────────────────────────────────────────────────────── 00000108 │ read total: 264 B (264 B) ``` Note that in this version, the last 8 bytes are showed as null bytes wrongly. - [x] last line all zeros - [x] find source of this error - [x] fix this - [x] repeats x lines has wrong number (bytes instead of lines?)
PlexSheep referenced this issue from a commit 2024-02-01 23:08:26 +01:00
PlexSheep referenced this issue from a commit 2024-02-01 23:27:32 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: PlexSheep/hedu#1
No description provided.