On Sunday 18 July 2010 00:26:36 Henri Verbeet wrote: > On 17 July 2010 09:06, Andrey Turkin <andrey.tur...@gmail.com> wrote: > > + if (nt->OptionalHeader.FileAlignment <= 0) > > I can't comment much on the changes themselves, but FileAlignment is > unsigned, so can't be < 0.
Original function has this check just before that added line: if (nt->OptionalHeader.SectionAlignment <= 0) { ERR("invalid section alignment %04x\n", nt->OptionalHeader.SectionAlignment); goto done; } So I've added something similar. The point here is to check alignments are positive; <= works just as well as !=, and is describes "not positive" condition better than !=.