Closed
Bug 1017835
Opened 9 years ago
Closed 9 years ago
DataChannelConnection::SendPacket should use array delete
Categories
(Core :: WebRTC: Networking, defect)
Core
WebRTC: Networking
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: erahm, Assigned: jesup)
Details
Attachments
(1 file)
1005 bytes,
patch
|
jib
:
review+
|
Details | Diff | Splinter Review |
The buffer[1] passed to |DataChannelConnection::SendPacket| is allocated with an array new, it should be freed with a corresponding array delete[2]. [1] http://dxr.mozilla.org/mozilla-central/source/netwerk/sctp/datachannel/DataChannel.cpp#716 [2] http://dxr.mozilla.org/mozilla-central/source/netwerk/sctp/datachannel/DataChannel.cpp#686
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Attachment #8432263 -
Flags: review?(jib)
Comment 2•9 years ago
|
||
Comment on attachment 8432263 [details] [diff] [review] use array delete for SCTP/DTLS SendPacket data Review of attachment 8432263 [details] [diff] [review]: ----------------------------------------------------------------- Comments optional. ::: netwerk/sctp/datachannel/DataChannel.cpp @@ +678,4 @@ > } > > int > DataChannelConnection::SendPacket(const unsigned char *data, size_t len, bool release) I find const here a little weird when transferring ownership. Also, how about DataChannelConnection::SendPacket(unsigned char data [], size_t len, bool release) to hint that an array is expected?
Attachment #8432263 -
Flags: review?(jib) → review+
Assignee | ||
Comment 3•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f04ad92a05ea Forgot to add the r=jib...
Target Milestone: --- → mozilla33
Assignee | ||
Comment 4•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c34082c15a99
Comment 5•9 years ago
|
||
Comment on attachment 8432263 [details] [diff] [review] use array delete for SCTP/DTLS SendPacket data Review of attachment 8432263 [details] [diff] [review]: ----------------------------------------------------------------- ::: netwerk/sctp/datachannel/DataChannel.cpp @@ +678,4 @@ > } > > int > DataChannelConnection::SendPacket(const unsigned char *data, size_t len, bool release) If you're going to transfer ownership, wouldn't it make more sense to use a smart pointer instead to delineate this clearly?
Comment 6•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c34082c15a99
Assignee: nobody → rjesup
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•