Uh oh!
There was an error while loading. Please reload this page.
fix(linux/xdgportal): don't pass external_only argument to eglQueryDmaBufModifiersEXT - #4754
Conversation
ReenigneArcher
commented
Feb 21, 2026
@psyke83 FYI |
psyke83
commented
Feb 21, 2026
That change looks reasonable. I'm guessing the proper way to do it would be to call eglQueryDmaBufModifiersEXT twice; the first time to get num_modifiers, and then a second call if num_modifiers is > 0 using external_only initialized as: |
ReenigneArcher
commented
Feb 26, 2026
@psyke83 could you clarify your comment? Are you asking for an adjustment to this PR? |
leenr
commented
Feb 26, 2026
I can make a PR to fix the capping for |
psyke83
commented
Feb 26, 2026
The PR is absolutely fine as-is now, since we don't need to check the value, as @leenr said. Apologies for the confusion. |
…yDmaBufModifiersEXT`
Bundle ReportBundle size has no change ✅ |
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #4754 +/- ##
==========================================
+ Coverage 15.35% 15.37% +0.01%
==========================================
Files 97 97 Lines 20651 20650 -1 Branches 9419 9419 ==========================================
+ Hits 3171 3174 +3 + Misses 13822 12934 -888 - Partials 3658 4542 +884
Flags with carried forward coverage won't be shown. Click here to find out more.
|



Description
eglQueryDmaBufModifiersEXTfunction accepts an array of booleans in anexternal_onlyargument, not a single boolean, as documented here.Passing a single boolean may lead to buffer overflow and some local variables of being overridden - e.g. an
ivariable:This, in turn, leads to
forloop not stopping as it eventually should, and after some time - to an assertion while trying to write todmabuf_infos[n_dmabuf_infos]:due to
n_dmabuf_infosreachingMAX_DMABUF_FORMATS.Because
external_onlyvalue is actually not used, it should be safe to just not pass the address at all.Alternatively, this patch works too:
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage