diff options
author | Stuart Bennett <sb476@cam.ac.uk> | 2008-03-14 11:58:33 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-03-14 11:58:33 -0400 |
commit | a5c862029846ddd5cecf44819f2a967e2a1672a9 (patch) | |
tree | c9290da5fd749157a938af6b6537db23c6bd8641 /src/linux_devmem.c | |
parent | d898072e28ac35f5b3569f48f2e90a9ef8eee2ca (diff) | |
download | xorg-lib-libpciaccess-a5c862029846ddd5cecf44819f2a967e2a1672a9.tar.gz |
Bug #13988: Fix reads from "0"-sized ROMs.
Diffstat (limited to 'src/linux_devmem.c')
-rw-r--r-- | src/linux_devmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/linux_devmem.c b/src/linux_devmem.c index a68ea11..21b45ef 100644 --- a/src/linux_devmem.c +++ b/src/linux_devmem.c @@ -124,7 +124,7 @@ pci_device_linux_devmem_read_rom(struct pci_device *dev, void *buffer) else { size_t bytes; - for (bytes = 0; bytes < priv->base.rom_size; /* empty */) { + for (bytes = 0; bytes < rom_size; /* empty */) { const ssize_t got = pread(fd, buffer, rom_size - bytes, rom_base + bytes); if (got == -1) { |