summaryrefslogtreecommitdiffstats
path: root/netwerk/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'netwerk/sctp')
-rw-r--r--netwerk/sctp/datachannel/DataChannel.cpp5
-rw-r--r--netwerk/sctp/datachannel/DataChannel.h2
-rwxr-xr-xnetwerk/sctp/src/netinet/sctp_auth.c2
-rwxr-xr-xnetwerk/sctp/src/netinet/sctp_pcb.c2
4 files changed, 9 insertions, 2 deletions
diff --git a/netwerk/sctp/datachannel/DataChannel.cpp b/netwerk/sctp/datachannel/DataChannel.cpp
index d47a9d5ea..f2a91c589 100644
--- a/netwerk/sctp/datachannel/DataChannel.cpp
+++ b/netwerk/sctp/datachannel/DataChannel.cpp
@@ -654,7 +654,10 @@ int
DataChannelConnection::SendPacket(unsigned char data[], size_t len, bool release)
{
//LOG(("%p: SCTP/DTLS sent %ld bytes", this, len));
- int res = mTransportFlow->SendPacket(data, len) < 0 ? 1 : 0;
+ int res = 0;
+ if (mTransportFlow) {
+ res = mTransportFlow->SendPacket(data, len) < 0 ? 1 : 0;
+ }
if (release)
delete [] data;
return res;
diff --git a/netwerk/sctp/datachannel/DataChannel.h b/netwerk/sctp/datachannel/DataChannel.h
index 84ab422fc..ebf29366b 100644
--- a/netwerk/sctp/datachannel/DataChannel.h
+++ b/netwerk/sctp/datachannel/DataChannel.h
@@ -111,7 +111,7 @@ public:
virtual void NotifyDataChannel(already_AddRefed<DataChannel> channel) = 0;
};
- explicit DataChannelConnection(DataConnectionListener *listener);
+ DataChannelConnection(DataConnectionListener *listener);
bool Init(unsigned short aPort, uint16_t aNumStreams, bool aUsingDtls);
void Destroy(); // So we can spawn refs tied to runnables in shutdown
diff --git a/netwerk/sctp/src/netinet/sctp_auth.c b/netwerk/sctp/src/netinet/sctp_auth.c
index 50432ad8a..ee5ca36ce 100755
--- a/netwerk/sctp/src/netinet/sctp_auth.c
+++ b/netwerk/sctp/src/netinet/sctp_auth.c
@@ -1525,6 +1525,8 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, struct mbuf *m,
if (p_random != NULL) {
keylen = sizeof(*p_random) + random_len;
bcopy(p_random, new_key->key, keylen);
+ } else {
+ keylen = 0;
}
/* append in the AUTH chunks */
if (chunks != NULL) {
diff --git a/netwerk/sctp/src/netinet/sctp_pcb.c b/netwerk/sctp/src/netinet/sctp_pcb.c
index 297097025..58c164f50 100755
--- a/netwerk/sctp/src/netinet/sctp_pcb.c
+++ b/netwerk/sctp/src/netinet/sctp_pcb.c
@@ -7688,6 +7688,8 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
if (p_random != NULL) {
keylen = sizeof(*p_random) + random_len;
bcopy(p_random, new_key->key, keylen);
+ } else {
+ keylen = 0;
}
/* append in the AUTH chunks */
if (chunks != NULL) {