mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
eif: cope with huge section offsets
Check for overflow to avoid that fseek() receives a sign-extended value. Cc: Dorjoy Chowdhury <dorjoychy111@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
8fa11a4df3
commit
619d144751
2 changed files with 8 additions and 0 deletions
|
@ -297,6 +297,10 @@ void QEMU_ERROR("code path is reachable")
|
|||
#error building with G_DISABLE_ASSERT is not supported
|
||||
#endif
|
||||
|
||||
#ifndef OFF_MAX
|
||||
#define OFF_MAX (sizeof (off_t) == 8 ? INT64_MAX : INT32_MAX)
|
||||
#endif
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
#define O_LARGEFILE 0
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue