|
From: | Juan Quintela |
Subject: | Re: [Qemu-devel] [PATCH 3/4] Add a protective section footer |
Date: | Wed, 20 May 2015 10:53:49 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
"Dr. David Alan Gilbert (git)" <address@hidden> wrote: > From: "Dr. David Alan Gilbert" <address@hidden> > > Badly formatted migration streams can go undetected or produce > misleading errors due to a lock of checking at the end of sections. > In particular a section that adds an extra 0x00 at the end > causes what looks like a normal end of stream and thus doesn't produce > any errors, and something that ends in a 0x01..0x04 kind of look > like real section headers and then fail when the section parser tries > to figure out which section they are. This is made worse by the > choice of 0x00..0x04 being small numbers that are particularly common > in normal section data. > > This patch adds a section footer consisting of a marker (0x7e - ~) > followed by the section-id that was also sent in the header. If > they mismatch then it throws an error explaining which section was > being loaded. > > Signed-off-by: Dr. David Alan Gilbert <address@hidden> Reviewed-by: Juan Quintela <address@hidden>
[Prev in Thread] | Current Thread | [Next in Thread] |