Skip to content

mod_mime_magic/mod_mime_libmagic testing and fixes - #757

Closed
notroj wants to merge 5 commits into
apache:trunkfrom
notroj:mime-magic-testing
Closed

notroj wants to merge 5 commits into
apache:trunkfrom
notroj:mime-magic-testing

Conversation

@notroj

@notroj notroj commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

notroj and others added 2 commits September 15, 2026 15:43
* test/modules/metadata/__init__.py,
  test/modules/metadata/samples.py,
  test/modules/metadata/test_002_mime_libmagic.py,
  test/modules/metadata/test_003_compare.py: New test suite.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
  LELONG values from unsigned bytes, avoiding a left shift overflow
  when the top byte has the high bit set.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
notroj and others added 3 commits September 15, 2026 16:39
  values from 32 bits, so that a rule value with the high bit set
  compares equal to the data with a 64-bit long.
  (mconvert): Store the assembled BELONG and LELONG value without
  sign extension.

* test/modules/metadata/test_001_mime_magic.py: Add tests for belong
  and ulelong rules with the high bit set.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… for

  an indirect rule resolving to a negative offset.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
asf-gitbox-commits pushed a commit that referenced this pull request Sep 15, 2026
* test/modules/metadata/__init__.py,
  test/modules/metadata/samples.py,
  test/modules/metadata/test_002_mime_libmagic.py,
  test/modules/metadata/test_003_compare.py: New test suite.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
GitHub: PR #757


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938257 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Sep 15, 2026
  LELONG values from unsigned bytes, avoiding a left shift overflow
  when the top byte has the high bit set.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
GitHub: PR #757


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938258 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Sep 15, 2026
  values from 32 bits, so that a rule value with the high bit set
  compares equal to the data with a 64-bit long.
  (mconvert): Store the assembled BELONG and LELONG value without
  sign extension.

* test/modules/metadata/test_001_mime_magic.py: Add tests for belong
  and ulelong rules with the high bit set.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
GitHub: PR #757


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938259 13f79535-47bb-0310-9956-ffa450edef68
asf-gitbox-commits pushed a commit that referenced this pull request Sep 15, 2026
  offsets and cast to apr_size_t before the bounds check so a
  negative offset cannot bypass it, both for the direct read and
  the indirect (INDIR) read.

Submitted by: arshiya tabasum <arshi bugqore.com>
GitHub: PR #757, closes #715


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938260 13f79535-47bb-0310-9956-ffa450edef68
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.

2 participants