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

[core] FIX: Added check for NULL unit when passing to updateConnStatus #2028

Merged

Conversation

ethouris
Copy link
Collaborator

@ethouris ethouris commented May 31, 2021

Fixes #2027

Fixed a problem: when getNextAvailableUnit returns NULL, the packet is read temporarily and dropped, as there's no possible storage where it could land. The problem is, however, that this packet's data were also necessary in some of the subprocedures in updateConnStatus and therefore it was being accessed (which was new towards UDT, and it's related to some bugfixes and additional data access necessity in case of HSv5).

The fix: the socket ID is pre-extracted (with fallback to 0 in case of lack of extracted unit) and wherever a packet is required to be accessed, a check for NULL is added, as well as a NULL pointer to a packet is now acceptable (replaced reference).

@ethouris ethouris changed the title Dev fix storage depleted crash [core] FIX: Added check for NULL unit when passing to updateConnStatus May 31, 2021
@maxsharabayko maxsharabayko added [core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior labels May 31, 2021
@maxsharabayko maxsharabayko added this to the v1.4.4 milestone May 31, 2021
@maxsharabayko maxsharabayko merged commit 1751bab into Haivision:master May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Priority: High Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] CRendezvousQueue::updateConnStatus() crash frequently
2 participants