Skip to content

Commit

Permalink
ncp-spinel: Fix a buffer-overflow bug in the inbound data pump.
Browse files Browse the repository at this point in the history
  • Loading branch information
darconeous committed Jun 16, 2016
1 parent 5aafbd5 commit 910769e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ncp-spinel/SpinelNCPInstance-DataPump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ SpinelNCPInstance::ncp_to_driver_pump()
mInboundFrameHDLCCRC = hdlc_crc16(mInboundFrameHDLCCRC, mInboundFrame[mInboundFrameSize-2]);
}

require(mInboundFrameSize >= sizeof(mInboundFrame), on_error);

mInboundFrame[mInboundFrameSize++] = byte;

} while(true);
Expand Down

0 comments on commit 910769e

Please sign in to comment.