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

Fixed QT segmentation fault in QBitmap.fromData in GlyphEntry #429

Merged
merged 2 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ jobs:
pathSource: test/files/test_files.zip
pathTarget: test/files

- name: Extract test file for regression test 428
uses: DuckSoft/extract-7z-action@v1.0
with:
pathSource: test/files/test_convert_428.zip
pathTarget: test/files

- name: Integration Test with a prerecorded PCAP.
working-directory: ./
run: coverage run test/test_prerecorded.py
Expand Down
4 changes: 4 additions & 0 deletions bin/pyrdp-convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
if not HAS_GUI and args.format == "mp4":
sys.stderr.write("Error: MP4 conversion requires the full PyRDP installation.")
sys.exit(1)
elif HAS_GUI and args.format == "mp4":
# Initialize QT because QBitmap will segfault without it (#378, #428)
from PySide2.QtWidgets import QApplication
app = QApplication()

logging.basicConfig(level=logging.CRITICAL)
logging.getLogger("scapy").setLevel(logging.ERROR)
Expand Down
Binary file added test/files/test_convert_428.zip
Binary file not shown.
13 changes: 13 additions & 0 deletions test/integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ else
PREPEND="coverage run --append bin/"
fi

export QT_QPA_PLATFORM=offscreen

echo ===================================================
echo pyrdp-player.py read a replay in headless mode test
${PREPEND}pyrdp-player.py --headless test/files/test_session.replay
Expand Down Expand Up @@ -68,3 +70,14 @@ echo ===================================================
echo Verify that the replay file exists
file -E "20200319000716_192.168.38.1:20989-192.168.38.1:3389.pyrdp"
rm "20200319000716_192.168.38.1:20989-192.168.38.1:3389.pyrdp"

echo ===================================================
echo pyrdp-convert.py regression issue 428
${PREPEND}pyrdp-convert.py test/files/test_convert_428.pyrdp -f mp4
echo

echo ===================================================
echo Verify the MP4 file
file test_convert_428.mp4 | grep "MP4 Base Media"
rm test_convert_428.mp4
echo