UnigramDev/Unigram/develop • 4eda2af • 3 files, +26/-52
Probe VoipCaptureBase before get_self
VoipManager::Start cast the descriptor's capture straight to VoipVideoCapture
with get_self, which reinterprets the ABI pointer without checking it. The
capture is whichever one is active when the call turns ready, so sharing the
screen before that point handed a VoipScreenCapture to the cast and m_impl was
read at the wrong offset.
The other three call sites already probed with try_as; move that chain into
GetVideoCaptureImpl and use it everywhere.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
UnigramDev/Unigram/develop • d200580 • 1 files, +17/-5
Drop group call frames when the E2E delegates are missing
OnE2EEncryptDecrypt returned the input untouched when the delegate was null,
which puts plaintext on the wire while encrypting and feeds ciphertext to the
decoder as if it were plaintext while decrypting. The window is real: the
delegates are installed after the manager is constructed, and cleared again
before Stop.
tgcalls drops the frame when the transform returns empty, which is what the
managed side already does when TDLib fails, so return empty here too.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
UnigramDev/Unigram/develop • fef656e • 1 files, +2/-5
Fix out-of-bounds write reading VoipDescriptor.PersistentState
The loop indexed into an empty vector. Nothing sets PersistentState today so it
never ran, but it would corrupt the heap the moment something did.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
UnigramDev/Unigram/develop • d4f7612 • 2 files, +18/-1
Survive a loopback capture that fails to start
OnStopCapture dereferenced m_AudioClient unconditionally, but StopCaptureAsync
accepts the error state and a failed activation never produces a client, so
stopping after a failed start crashed. Process loopback is unavailable on older
builds, which is exactly when that happens.
The MFStartup was also left dangling on that path, since StopCaptureAsync is
what pairs it. Track it and shut down from the destructor if we never got there.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
UnigramDev/Unigram/develop • c4bbb77 • 2 files, +19/-9
Hold CLoopbackCapture by reference, and only for screencast
It is a ref-counted RuntimeClass whose queued MF work items hold references of
their own, so storing it by value freed its storage out from under them. Hold a
ComPtr instead, and create it only on the screencast path that uses it, which
also drops the StopCaptureAsync every other call was making into a manager that
had never captured anything.
Skip the loopback when it fails to start rather than sharing the screen with an
audio capture that is not running.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
#unigram
Post #20569
55