Attention is currently required from: Nico Huber, David Hendricks, Julius Werner, Arthur Heymans.

Julius Werner uploaded patch set #2 to this change.

View Change

libflashrom/fmap: Don't use off_t for flash offsets

off_t is a special POSIX type that is used to represent file offsets in
certain APIs (e.g. lseek(), mmap()), and should not be reused to
represent anything else (such as flash offsets). In particular, the
width of the type may change based on the definition of the
_FILE_OFFSET_BITS macro. Using such a type at the libflashrom interface
is particularly dangerous, because if a program is built with a
different _FILE_OFFSET_BITS value than libflashrom, the resulting ABI
corruption will cause very very nasty and confusing bugs. This patch
replaces all instances of off_t that are not related to file offsets
with (s)size_t.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I68a386973f79ea634f63dfcd7d95a63400e1fdee
---
M fmap.c
M libflashrom.c
M libflashrom.h
3 files changed, 6 insertions(+), 6 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/43/61943/2

To view, visit change 61943. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I68a386973f79ea634f63dfcd7d95a63400e1fdee
Gerrit-Change-Number: 61943
Gerrit-PatchSet: 2
Gerrit-Owner: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Nico Huber <nico.h@gmx.de>
Gerrit-Attention: David Hendricks <david.hendricks@gmail.com>
Gerrit-Attention: Julius Werner <jwerner@chromium.org>
Gerrit-Attention: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-MessageType: newpatchset