Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release/3.9] Miramon: avoid Unsigned-integer-overflow in MMCreateExtendedDBFIndex() #9786

Merged
merged 1 commit into from
Apr 27, 2024

Conversation

rouault
Copy link
Member

@rouault rouault commented Apr 26, 2024

Backport #9776
Authored by: @rouault

Validate that FirstRecordOffset as computed in
MM_ReadExtendedDBFHeaderFromFile() is not negative. Otherwise it gets
later passed to MMCreateExtendedDBFIndex() which casts it to a uint64_t,
and thus lead to unsigned integer overflow when doing:
```
    fseek_function(f,
                   (MM_FILE_OFFSET)offset_1era +
                       (MM_FILE_OFFSET)bytes_acumulats_id_grafic,
                   SEEK_SET);
```

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=68303
@rouault rouault added this to the 3.9.0 milestone Apr 27, 2024
@rouault rouault merged commit 3ba7602 into release/3.9 Apr 27, 2024
33 checks passed
@rouault rouault deleted the backport-9776-to-release/3.9 branch April 27, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant