Skip to content

lib: xxh64: fix byte ordering bug on big-endian systems - #314

Open
nmeyerhans wants to merge 1 commit into
dovecot:mainfrom
nmeyerhans:xxh64-endian-fix
Open

lib: xxh64: fix byte ordering bug on big-endian systems#314
nmeyerhans wants to merge 1 commit into
dovecot:mainfrom
nmeyerhans:xxh64-endian-fix

Conversation

@nmeyerhans

Copy link
Copy Markdown

Convert from little-endian to host byte order where necessary.

Background at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1146449

Pull Request

  • I confirm that this PR does not fix, disclose, demonstrate, or discuss a suspected security vulnerability.
  • I have read CONTRIBUTING.md and SECURITY.md
  • I have compiled and tested this code'

AI policy

Dovecot allows AI assisted or generated code, but we would like to know if it is such.
Do not include 'Co-Authored-By' header in the commit.

  • This PR includes AI-generated code or text.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactor or code cleanup

Description

When dovecot reads multi-byte data from memory and interprets it as unsigned integer data, it fails to properly convert from little endian (as required in the xxh64 spec) to host byte order. This results in different has values depending on the host byte order.

This was identified by the test suite when building Dovecot for Debian/s390x. See the Debian bug and build log for more.

Convert from little-endian to host byte order where necessary.

Background at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1146449
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