Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
079682f3
Commit
079682f3
authored
Dec 19, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deflatehd: Fix crash
parent
e8513b32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/deflatehd.cc
src/deflatehd.cc
+6
-5
No files found.
src/deflatehd.cc
View file @
079682f3
...
...
@@ -186,9 +186,11 @@ static int deflate_hd_json(json_t *obj, nghttp2_hd_deflater *deflater,
return
0
;
}
static
void
init_deflater
(
nghttp2_hd_deflater
*
deflater
)
{
static
nghttp2_hd_deflater
*
init_deflater
()
{
nghttp2_hd_deflater
*
deflater
;
nghttp2_hd_deflate_new
(
&
deflater
,
config
.
deflate_table_size
);
nghttp2_hd_deflate_change_table_size
(
deflater
,
config
.
table_size
);
return
deflater
;
}
static
void
deinit_deflater
(
nghttp2_hd_deflater
*
deflater
)
{
...
...
@@ -197,7 +199,6 @@ static void deinit_deflater(nghttp2_hd_deflater *deflater) {
static
int
perform
(
void
)
{
json_error_t
error
;
nghttp2_hd_deflater
*
deflater
=
NULL
;
auto
json
=
json_loadf
(
stdin
,
0
,
&
error
);
...
...
@@ -218,7 +219,7 @@ static int perform(void) {
exit
(
EXIT_FAILURE
);
}
init_deflater
(
deflater
);
auto
deflater
=
init_deflater
(
);
output_json_header
();
auto
len
=
json_array_size
(
cases
);
...
...
@@ -244,8 +245,8 @@ static int perform(void) {
static
int
perform_from_http1text
(
void
)
{
char
line
[
1
<<
14
];
int
seq
=
0
;
nghttp2_hd_deflater
*
deflater
=
NULL
;
init_deflater
(
deflater
);
auto
deflater
=
init_deflater
(
);
output_json_header
();
for
(;;)
{
std
::
vector
<
nghttp2_nv
>
nva
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment