https://bugs.kde.org/show_bug.cgi?id=497994

            Bug ID: 497994
           Summary: Krfb crashes on start after "Remote control requested"
                    dialog
    Classification: Applications
           Product: krfb
           Version: 24.08.3
          Platform: Gentoo Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: grundleb...@googlemail.com
          Reporter: ivan.s...@gmail.com
  Target Milestone: ---

SUMMARY
Krfb segfaults immediately after clicking "Share" in the "Remote control
requested" dialog on start. The backtrace points to
krfb-24.08.3/framebuffers/pipewire:377.

The relevant code is as follows:

// FIXME: Assuming stride == width * 4, not sure to which extent this holds
setVideoSize(frame.dataFrame->size);
memcpy(q->fb, frame.dataFrame->data, frame.dataFrame->size.width() *
frame.dataFrame->stride);

It seems there might be an issue with the calculation of the framebuffer size.
If stride equals width * 4, then the current code appears to multiply width
twice (width*stride). As a test, I changed the calculation to use
size.height()*stride instead, and this modification appears to resolve the
issue, though I am not certain this is the correct solution or explanation.

STEPS TO REPRODUCE
1. Launch Krfb.
2. Click "Share" when the "Remote control requested" dialog appears.

OBSERVED RESULT
Krfb segfaults immediately after clicking "Share."

EXPECTED RESULT
The application should proceed to share the screen without crashing.

SOFTWARE/OS VERSIONS
Windows: N/A
macOS: N/A
Linux/KDE Plasma: 
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.3

ADDITIONAL INFORMATION
Pipewire version 1.2.6

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to