Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d165e295
Commit
d165e295
authored
Mar 31, 2003
by
James Morris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CRYPTO]: deflate module: workaround zlib bug.
parent
1bd0f7f4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
crypto/deflate.c
crypto/deflate.c
+12
-1
No files found.
crypto/deflate.c
View file @
d165e295
...
@@ -181,7 +181,18 @@ static int deflate_decompress(void *ctx, const u8 *src, unsigned int slen,
...
@@ -181,7 +181,18 @@ static int deflate_decompress(void *ctx, const u8 *src, unsigned int slen,
stream
->
next_out
=
(
u8
*
)
dst
;
stream
->
next_out
=
(
u8
*
)
dst
;
stream
->
avail_out
=
*
dlen
;
stream
->
avail_out
=
*
dlen
;
ret
=
zlib_inflate
(
stream
,
Z_SYNC_FLUSH
);
/*
* Work around a bug in zlib, which sometimes wants to taste an extra
* byte when being used in the (undocumented) raw deflate mode.
* (From USAGI).
*/
if
(
ret
==
Z_OK
&&
!
stream
->
avail_in
&&
stream
->
avail_out
)
{
u8
zerostuff
=
0
;
stream
->
next_in
=
&
zerostuff
;
stream
->
avail_in
=
1
;
ret
=
zlib_inflate
(
stream
,
Z_FINISH
);
ret
=
zlib_inflate
(
stream
,
Z_FINISH
);
}
if
(
ret
!=
Z_STREAM_END
)
{
if
(
ret
!=
Z_STREAM_END
)
{
ret
=
-
EINVAL
;
ret
=
-
EINVAL
;
goto
out
;
goto
out
;
...
...
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