ipv6: avoid unbounded stack usage in send_fragments().
This commit is contained in:
parent
df4bea7d7c
commit
70422d06a9
@ -22,6 +22,7 @@
|
||||
|
||||
#include <ByteOrder.h>
|
||||
#include <KernelExport.h>
|
||||
#include <StackOrHeapArray.h>
|
||||
#include <util/AutoLock.h>
|
||||
#include <util/list.h>
|
||||
#include <util/DoublyLinkedList.h>
|
||||
@ -636,7 +637,7 @@ send_fragments(ipv6_protocol* protocol, struct net_route* route,
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
uint8 data[bytesLeft];
|
||||
BStackOrHeapArray<uint8, 128> data(bytesLeft);
|
||||
status = gBufferModule->read(buffer, headersLength, data, bytesLeft);
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
Loading…
Reference in New Issue
Block a user