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

asf: fix GUID reading on big endian platforms (backport #2694) #2698

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 17, 2023

This is an automatic backport of pull request #2694 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

Setting the initial parts (data1_, data2_, data3_) from the bytes
directly using memcpy() means that they will be interpreted depending
on the platform endianness. For example, the initial 4 bytes of the ASF
header are 0x30, 0x26, 0xB2, 0x75, which will be read as 0x3026B275 on
big endian platforms, never matching the actual GUID (0x75B22630), which
is always specified in little endian format.

Hence, when reading a GUID from data, make sure to turn the GUID parts
to little endian. This fixes the reading of ASF files on big endian
platforms.

Fixes commit bed8d3d

(cherry picked from commit b826a7d)
@ghost
Copy link

ghost commented Jul 17, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@codecov
Copy link

codecov bot commented Jul 17, 2023

Codecov Report

Merging #2698 (b2f73aa) into 0.28.x (414bff1) will decrease coverage by 0.01%.
The diff coverage is 34.28%.

@@            Coverage Diff             @@
##           0.28.x    #2698      +/-   ##
==========================================
- Coverage   63.92%   63.92%   -0.01%     
==========================================
  Files         103      103              
  Lines       22306    22310       +4     
  Branches    10796    10796              
==========================================
+ Hits        14259    14261       +2     
  Misses       5827     5827              
- Partials     2220     2222       +2     
Impacted Files Coverage Δ
include/exiv2/image.hpp 100.00% <ø> (ø)
include/exiv2/matroskavideo.hpp 60.00% <ø> (ø)
include/exiv2/slice.hpp 90.56% <ø> (ø)
include/exiv2/value.hpp 85.11% <ø> (ø)
src/basicio.cpp 50.52% <0.00%> (ø)
src/canonmn_int.cpp 72.88% <ø> (ø)
src/nikonmn_int.cpp 61.20% <0.00%> (ø)
src/panasonicmn_int.cpp 52.58% <ø> (ø)
src/quicktimevideo.cpp 60.14% <0.00%> (ø)
src/rafimage.cpp 20.29% <ø> (ø)
... and 13 more

@neheb neheb merged commit 2d5a51b into 0.28.x Jul 18, 2023
106 checks passed
@neheb neheb deleted the mergify/bp/0.28.x/pr-2694 branch July 18, 2023 00:21
@kevinbackhouse kevinbackhouse added this to the v0.28.1 milestone Nov 4, 2023
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.

None yet

3 participants