Skip to content

Commit bd1ee9b

Browse files
committed
fix tests
1 parent 1fc18be commit bd1ee9b

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

go/ql/test/experimental/CWE-522-DecompressionBombs/DecompressionBombs.expected

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ edges
44
| test.go:59:16:59:27 | selection of Body | test.go:147:20:147:23 | definition of file |
55
| test.go:60:16:60:46 | call to FormValue | test.go:106:20:106:27 | definition of filename |
66
| test.go:61:20:61:48 | call to PostFormValue | test.go:77:24:77:31 | definition of filename |
7+
| test.go:63:13:63:24 | selection of Body | test.go:97:17:97:19 | definition of src |
78
| test.go:77:24:77:31 | definition of filename | test.go:78:25:78:32 | filename |
89
| test.go:78:2:78:33 | ... := ...[0] | test.go:81:12:81:12 | f |
910
| test.go:78:25:78:32 | filename | test.go:78:2:78:33 | ... := ...[0] |
1011
| test.go:81:3:81:19 | ... := ...[0] | test.go:83:37:83:38 | rc |
1112
| test.go:81:12:81:12 | f | test.go:81:3:81:19 | ... := ...[0] |
13+
| test.go:97:17:97:19 | definition of src | test.go:98:29:98:31 | src |
14+
| test.go:98:2:98:32 | ... := ...[0] | test.go:102:11:102:26 | type conversion |
15+
| test.go:98:29:98:31 | src | test.go:98:2:98:32 | ... := ...[0] |
16+
| test.go:102:11:102:26 | type conversion | test.go:103:23:103:28 | newSrc |
1217
| test.go:106:20:106:27 | definition of filename | test.go:108:25:108:32 | filename |
1318
| test.go:106:20:106:27 | definition of filename | test.go:121:43:121:50 | filename |
1419
| test.go:108:2:108:33 | ... := ...[0] | test.go:110:12:110:12 | f |
@@ -160,12 +165,18 @@ nodes
160165
| test.go:59:16:59:27 | selection of Body | semmle.label | selection of Body |
161166
| test.go:60:16:60:46 | call to FormValue | semmle.label | call to FormValue |
162167
| test.go:61:20:61:48 | call to PostFormValue | semmle.label | call to PostFormValue |
168+
| test.go:63:13:63:24 | selection of Body | semmle.label | selection of Body |
163169
| test.go:77:24:77:31 | definition of filename | semmle.label | definition of filename |
164170
| test.go:78:2:78:33 | ... := ...[0] | semmle.label | ... := ...[0] |
165171
| test.go:78:25:78:32 | filename | semmle.label | filename |
166172
| test.go:81:3:81:19 | ... := ...[0] | semmle.label | ... := ...[0] |
167173
| test.go:81:12:81:12 | f | semmle.label | f |
168174
| test.go:83:37:83:38 | rc | semmle.label | rc |
175+
| test.go:97:17:97:19 | definition of src | semmle.label | definition of src |
176+
| test.go:98:2:98:32 | ... := ...[0] | semmle.label | ... := ...[0] |
177+
| test.go:98:29:98:31 | src | semmle.label | src |
178+
| test.go:102:11:102:26 | type conversion | semmle.label | type conversion |
179+
| test.go:103:23:103:28 | newSrc | semmle.label | newSrc |
169180
| test.go:106:20:106:27 | definition of filename | semmle.label | definition of filename |
170181
| test.go:108:2:108:33 | ... := ...[0] | semmle.label | ... := ...[0] |
171182
| test.go:108:25:108:32 | filename | semmle.label | filename |
@@ -301,6 +312,7 @@ nodes
301312
subpaths
302313
#select
303314
| test.go:83:37:83:38 | rc | test.go:61:20:61:48 | call to PostFormValue | test.go:83:37:83:38 | rc | This decompression is $@. | test.go:61:20:61:48 | call to PostFormValue | decompressing compressed data without managing output size |
315+
| test.go:103:23:103:28 | newSrc | test.go:63:13:63:24 | selection of Body | test.go:103:23:103:28 | newSrc | This decompression is $@. | test.go:63:13:63:24 | selection of Body | decompressing compressed data without managing output size |
304316
| test.go:112:37:112:38 | rc | test.go:60:16:60:46 | call to FormValue | test.go:112:37:112:38 | rc | This decompression is $@. | test.go:60:16:60:46 | call to FormValue | decompressing compressed data without managing output size |
305317
| test.go:125:37:125:38 | rc | test.go:60:16:60:46 | call to FormValue | test.go:125:37:125:38 | rc | This decompression is $@. | test.go:60:16:60:46 | call to FormValue | decompressing compressed data without managing output size |
306318
| test.go:142:36:142:51 | fileReaderCloser | test.go:58:15:58:26 | selection of Body | test.go:142:36:142:51 | fileReaderCloser | This decompression is $@. | test.go:58:15:58:26 | selection of Body | decompressing compressed data without managing output size |

go/ql/test/experimental/CWE-522-DecompressionBombs/test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func DecompressHandler(w http.ResponseWriter, request *http.Request) {
6060
ZipOpenReader(request.FormValue("filepathba"))
6161
ZipOpenReaderSafe(request.PostFormValue("test"))
6262
GZipOpenReaderSafe(request.PostFormValue("test"))
63-
GZipsafeReader(request.Body, "dest")
63+
GZipReader(request.Body, "dest")
6464
}
6565

6666
func GZipOpenReaderSafe(filename string) {

0 commit comments

Comments
 (0)