File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ Module Name:
2020
2121
2222#include "netvmin6.h"
23+ #include <ntintsafe.h>
2324#include "ctrlpath.tmh"
2425
2526
@@ -1671,6 +1672,9 @@ Return Value:
16711672
16721673 do
16731674 {
1675+ ULONG ClassificationBytes = 0 ;
1676+ ULONG BytesRead = 0 ;
1677+
16741678 //
16751679 // Verify that the request matches our requirements.
16761680 //
@@ -1681,8 +1685,18 @@ Return Value:
16811685 //
16821686 // Request is well formed, set bytes read.
16831687 //
1684- Method -> BytesRead = NDIS_SIZEOF_QOS_PARAMETERS_REVISION_1 +
1685- Params -> NumClassificationElements * Params -> ClassificationElementSize ;
1688+ if (!NT_SUCCESS (RtlULongMult (Params -> NumClassificationElements ,
1689+ Params -> ClassificationElementSize ,
1690+ & ClassificationBytes )) ||
1691+ !NT_SUCCESS (RtlULongAdd (NDIS_SIZEOF_QOS_PARAMETERS_REVISION_1 ,
1692+ ClassificationBytes ,
1693+ & BytesRead )))
1694+ {
1695+ Status = NDIS_STATUS_INVALID_LENGTH ;
1696+ break ;
1697+ }
1698+
1699+ Method -> BytesRead = BytesRead ;
16861700
16871701 Status = SetQOSParameters (Adapter , Params );
16881702 if (Status != NDIS_STATUS_SUCCESS )
You can’t perform that action at this time.
0 commit comments