Skip to content

Commit dc8dc61

Browse files
committed
C++: Fix type name.
1 parent ab34bd2 commit dc8dc61

File tree

4 files changed

+46
-43
lines changed

4 files changed

+46
-43
lines changed

cpp/ql/lib/semmle/code/cpp/models/implementations/Http.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ private import semmle.code.cpp.ir.dataflow.FlowSteps
33
private import semmle.code.cpp.dataflow.new.DataFlow
44

55
private class HttpRequest extends Class {
6-
HttpRequest() { this.hasGlobalName("_HTTP_REQUEST") }
6+
HttpRequest() { this.hasGlobalName("_HTTP_REQUEST_V1") }
77
}
88

99
private class HttpRequestInheritingContent extends TaintInheritingContent, DataFlow::FieldContent {

cpp/ql/test/library-tests/dataflow/external-models/flow.expected

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -332,23 +332,23 @@ edges
332332
| windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | windows.cpp:731:10:731:36 | * ... | provenance | |
333333
| windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | windows.cpp:733:10:733:35 | * ... | provenance | |
334334
| windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | windows.cpp:735:10:735:37 | * ... | provenance | |
335-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:898:15:898:53 | *& ... | provenance | Src:MaD:7 |
336-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:902:10:902:31 | * ... | provenance | Src:MaD:7 |
337-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:904:10:904:42 | * ... | provenance | Src:MaD:7 |
338-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:906:10:906:57 | * ... | provenance | Src:MaD:7 |
339-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:908:10:908:60 | * ... | provenance | Src:MaD:7 |
340-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:909:54:909:63 | FileHandle | provenance | Src:MaD:7 |
341-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:911:10:911:70 | * ... | provenance | Src:MaD:7 |
342-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:913:10:913:72 | * ... | provenance | Src:MaD:7 |
343-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:915:10:915:64 | * ... | provenance | Src:MaD:7 |
344-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:917:10:917:51 | * ... | provenance | Src:MaD:7 |
345-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:919:10:919:52 | * ... | provenance | Src:MaD:7 |
346-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | windows.cpp:921:10:921:63 | * ... | provenance | Src:MaD:7 |
347-
| windows.cpp:898:15:898:53 | *& ... | windows.cpp:900:10:900:11 | * ... | provenance | |
348-
| windows.cpp:926:70:926:75 | HttpReceiveRequestEntityBody output argument | windows.cpp:928:10:928:16 | * ... | provenance | Src:MaD:8 |
349-
| windows.cpp:933:70:933:78 | HttpReceiveClientCertificate output argument | windows.cpp:934:15:934:48 | *& ... | provenance | Src:MaD:6 |
350-
| windows.cpp:933:70:933:78 | HttpReceiveClientCertificate output argument | windows.cpp:938:10:938:31 | * ... | provenance | Src:MaD:6 |
351-
| windows.cpp:934:15:934:48 | *& ... | windows.cpp:936:10:936:11 | * ... | provenance | |
335+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:901:15:901:53 | *& ... | provenance | Src:MaD:7 |
336+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:905:10:905:31 | * ... | provenance | Src:MaD:7 |
337+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:907:10:907:42 | * ... | provenance | Src:MaD:7 |
338+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:909:10:909:57 | * ... | provenance | Src:MaD:7 |
339+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:911:10:911:60 | * ... | provenance | Src:MaD:7 |
340+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:912:54:912:63 | FileHandle | provenance | Src:MaD:7 |
341+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:914:10:914:70 | * ... | provenance | Src:MaD:7 |
342+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:916:10:916:72 | * ... | provenance | Src:MaD:7 |
343+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:918:10:918:64 | * ... | provenance | Src:MaD:7 |
344+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:920:10:920:51 | * ... | provenance | Src:MaD:7 |
345+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:922:10:922:52 | * ... | provenance | Src:MaD:7 |
346+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | windows.cpp:924:10:924:63 | * ... | provenance | Src:MaD:7 |
347+
| windows.cpp:901:15:901:53 | *& ... | windows.cpp:903:10:903:11 | * ... | provenance | |
348+
| windows.cpp:929:70:929:75 | HttpReceiveRequestEntityBody output argument | windows.cpp:931:10:931:16 | * ... | provenance | Src:MaD:8 |
349+
| windows.cpp:936:70:936:78 | HttpReceiveClientCertificate output argument | windows.cpp:937:15:937:48 | *& ... | provenance | Src:MaD:6 |
350+
| windows.cpp:936:70:936:78 | HttpReceiveClientCertificate output argument | windows.cpp:941:10:941:31 | * ... | provenance | Src:MaD:6 |
351+
| windows.cpp:937:15:937:48 | *& ... | windows.cpp:939:10:939:11 | * ... | provenance | |
352352
nodes
353353
| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | semmle.label | [summary param] *0 in buffer |
354354
| asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | semmle.label | [summary] to write: ReturnValue in buffer |
@@ -656,26 +656,26 @@ nodes
656656
| windows.cpp:731:10:731:36 | * ... | semmle.label | * ... |
657657
| windows.cpp:733:10:733:35 | * ... | semmle.label | * ... |
658658
| windows.cpp:735:10:735:37 | * ... | semmle.label | * ... |
659-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | semmle.label | HttpReceiveHttpRequest output argument |
660-
| windows.cpp:898:15:898:53 | *& ... | semmle.label | *& ... |
661-
| windows.cpp:900:10:900:11 | * ... | semmle.label | * ... |
662-
| windows.cpp:902:10:902:31 | * ... | semmle.label | * ... |
663-
| windows.cpp:904:10:904:42 | * ... | semmle.label | * ... |
664-
| windows.cpp:906:10:906:57 | * ... | semmle.label | * ... |
665-
| windows.cpp:908:10:908:60 | * ... | semmle.label | * ... |
666-
| windows.cpp:909:54:909:63 | FileHandle | semmle.label | FileHandle |
667-
| windows.cpp:911:10:911:70 | * ... | semmle.label | * ... |
668-
| windows.cpp:913:10:913:72 | * ... | semmle.label | * ... |
669-
| windows.cpp:915:10:915:64 | * ... | semmle.label | * ... |
670-
| windows.cpp:917:10:917:51 | * ... | semmle.label | * ... |
671-
| windows.cpp:919:10:919:52 | * ... | semmle.label | * ... |
672-
| windows.cpp:921:10:921:63 | * ... | semmle.label | * ... |
673-
| windows.cpp:926:70:926:75 | HttpReceiveRequestEntityBody output argument | semmle.label | HttpReceiveRequestEntityBody output argument |
674-
| windows.cpp:928:10:928:16 | * ... | semmle.label | * ... |
675-
| windows.cpp:933:70:933:78 | HttpReceiveClientCertificate output argument | semmle.label | HttpReceiveClientCertificate output argument |
676-
| windows.cpp:934:15:934:48 | *& ... | semmle.label | *& ... |
677-
| windows.cpp:936:10:936:11 | * ... | semmle.label | * ... |
678-
| windows.cpp:938:10:938:31 | * ... | semmle.label | * ... |
659+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | semmle.label | HttpReceiveHttpRequest output argument |
660+
| windows.cpp:901:15:901:53 | *& ... | semmle.label | *& ... |
661+
| windows.cpp:903:10:903:11 | * ... | semmle.label | * ... |
662+
| windows.cpp:905:10:905:31 | * ... | semmle.label | * ... |
663+
| windows.cpp:907:10:907:42 | * ... | semmle.label | * ... |
664+
| windows.cpp:909:10:909:57 | * ... | semmle.label | * ... |
665+
| windows.cpp:911:10:911:60 | * ... | semmle.label | * ... |
666+
| windows.cpp:912:54:912:63 | FileHandle | semmle.label | FileHandle |
667+
| windows.cpp:914:10:914:70 | * ... | semmle.label | * ... |
668+
| windows.cpp:916:10:916:72 | * ... | semmle.label | * ... |
669+
| windows.cpp:918:10:918:64 | * ... | semmle.label | * ... |
670+
| windows.cpp:920:10:920:51 | * ... | semmle.label | * ... |
671+
| windows.cpp:922:10:922:52 | * ... | semmle.label | * ... |
672+
| windows.cpp:924:10:924:63 | * ... | semmle.label | * ... |
673+
| windows.cpp:929:70:929:75 | HttpReceiveRequestEntityBody output argument | semmle.label | HttpReceiveRequestEntityBody output argument |
674+
| windows.cpp:931:10:931:16 | * ... | semmle.label | * ... |
675+
| windows.cpp:936:70:936:78 | HttpReceiveClientCertificate output argument | semmle.label | HttpReceiveClientCertificate output argument |
676+
| windows.cpp:937:15:937:48 | *& ... | semmle.label | *& ... |
677+
| windows.cpp:939:10:939:11 | * ... | semmle.label | * ... |
678+
| windows.cpp:941:10:941:31 | * ... | semmle.label | * ... |
679679
subpaths
680680
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | asio_streams.cpp:100:44:100:62 | call to buffer |
681681
| azure.cpp:257:5:257:8 | *resp | azure.cpp:113:16:113:19 | [summary param] this in Read | azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | azure.cpp:257:16:257:21 | Read output argument |

cpp/ql/test/library-tests/dataflow/external-models/sources.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
| windows.cpp:669:70:669:79 | WinHttpQueryHeadersEx output argument | remote |
3333
| windows.cpp:669:82:669:87 | WinHttpQueryHeadersEx output argument | remote |
3434
| windows.cpp:669:105:669:112 | WinHttpQueryHeadersEx output argument | remote |
35-
| windows.cpp:897:64:897:77 | HttpReceiveHttpRequest output argument | remote |
36-
| windows.cpp:926:70:926:75 | HttpReceiveRequestEntityBody output argument | remote |
37-
| windows.cpp:933:70:933:78 | HttpReceiveClientCertificate output argument | remote |
35+
| windows.cpp:900:64:900:77 | HttpReceiveHttpRequest output argument | remote |
36+
| windows.cpp:929:70:929:75 | HttpReceiveRequestEntityBody output argument | remote |
37+
| windows.cpp:936:70:936:78 | HttpReceiveClientCertificate output argument | remote |

cpp/ql/test/library-tests/dataflow/external-models/windows.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ typedef struct _HTTP_SSL_INFO {
836836
ULONG SslClientCertNegotiated;
837837
} HTTP_SSL_INFO, *PHTTP_SSL_INFO;
838838

839-
typedef struct _HTTP_REQUEST {
839+
typedef struct _HTTP_REQUEST_V1 {
840840
ULONG Flags;
841841
HTTP_CONNECTION_ID ConnectionId;
842842
HTTP_REQUEST_ID RequestId;
@@ -855,7 +855,10 @@ typedef struct _HTTP_REQUEST {
855855
PHTTP_DATA_CHUNK pEntityChunks;
856856
HTTP_RAW_CONNECTION_ID RawConnectionId;
857857
PHTTP_SSL_INFO pSslInfo;
858-
} HTTP_REQUEST, *PHTTP_REQUEST;
858+
} HTTP_REQUEST_V1, *PHTTP_REQUEST_V1;
859+
860+
using HTTP_REQUEST = HTTP_REQUEST_V1;
861+
using PHTTP_REQUEST = PHTTP_REQUEST_V1;
859862

860863
ULONG HttpReceiveHttpRequest(
861864
HANDLE RequestQueueHandle,

0 commit comments

Comments
 (0)