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

new Chrome v98 produces extra sdp attributes, up the limit so we do n… #1391

Merged
merged 3 commits into from
Feb 8, 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
3 changes: 2 additions & 1 deletion src/source/PeerConnection/SessionDescription.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ STATUS setPayloadTypesFromOffer(PHashTable codecTable, PHashTable rtxTable, PSes
ENTERS();
STATUS retStatus = STATUS_SUCCESS;
PSdpMediaDescription pMediaDescription = NULL;
UINT8 currentMedia, currentAttribute;
UINT8 currentAttribute;
UINT16 currentMedia;
PCHAR attributeValue, end;
UINT64 parsedPayloadType, hashmapPayloadType, fmtpVal, aptVal;
UINT16 aptFmtpVals[MAX_SDP_FMTP_VALUES];
Expand Down
3 changes: 1 addition & 2 deletions src/source/Sdp/Deserialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ STATUS parseMediaName(PSessionDescription pSessionDescription, PCHAR pch, UINT32
{
ENTERS();
STATUS retStatus = STATUS_SUCCESS;

CHK(pSessionDescription->mediaCount < MAX_SDP_SESSION_MEDIA_COUNT, STATUS_BUFFER_TOO_SMALL);

STRNCPY(pSessionDescription->mediaDescriptions[pSessionDescription->mediaCount].mediaName, (pch + SDP_ATTRIBUTE_LENGTH),
Expand Down Expand Up @@ -48,7 +47,7 @@ STATUS parseMediaAttributes(PSessionDescription pSessionDescription, PCHAR pch,
ENTERS();
STATUS retStatus = STATUS_SUCCESS;
PCHAR search;
UINT8 currentMediaAttributesCount;
UINT16 currentMediaAttributesCount;

currentMediaAttributesCount = pSessionDescription->mediaDescriptions[pSessionDescription->mediaCount - 1].mediaAttributesCount;

Expand Down
6 changes: 3 additions & 3 deletions src/source/Sdp/Sdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ extern "C" {
#define MAX_SDP_SESSION_MEDIA_COUNT 5
#define MAX_SDP_MEDIA_BANDWIDTH_COUNT 2

#define MAX_SDP_ATTRIBUTES_COUNT 128
#define MAX_SDP_ATTRIBUTES_COUNT 256

/*
* c=<nettype> <addrtype> <connection-address>
Expand Down Expand Up @@ -198,9 +198,9 @@ typedef struct {

SdpMediaDescription mediaDescriptions[MAX_SDP_SESSION_MEDIA_COUNT];

UINT8 sessionAttributesCount;
UINT16 sessionAttributesCount;

UINT8 mediaCount;
UINT16 mediaCount;

UINT8 timezoneCount;

Expand Down
2 changes: 1 addition & 1 deletion tst/SdpApiTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ s=-
t=0 0
)";

for (auto i = 0; i < 250; i++) {
for (auto i = 0; i <= MAX_SDP_ATTRIBUTES_COUNT + 1; i++) {
sessionDescriptionNoMedia += "a=b\n";
}

Expand Down