Created
April 2, 2012 11:56
-
-
Save jgehring/2282977 to your computer and use it in GitHub Desktop.
Fixed return value check in snappy_uncompress_iov()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/snappy.c b/snappy.c | |
| index 3f0e159..aba8990 100644 | |
| --- a/snappy.c | |
| +++ b/snappy.c | |
| @@ -1383,7 +1383,7 @@ bool snappy_uncompress_iov(struct iovec *iov_in, int iov_in_len, | |
| .base = uncompressed, | |
| .op = uncompressed | |
| }; | |
| - return internal_uncompress(&reader, &output, 0xffffffff); | |
| + return (internal_uncompress(&reader, &output, 0xffffffff) == 0); | |
| } | |
| EXPORT_SYMBOL(snappy_uncompress_iov); | |
| @@ -1467,7 +1467,7 @@ bool snappy_uncompress(const char *compressed, size_t n, char *uncompressed) | |
| .base = uncompressed, | |
| .op = uncompressed | |
| }; | |
| - return internal_uncompress(&reader, &output, 0xffffffff); | |
| + return (internal_uncompress(&reader, &output, 0xffffffff) == 0); | |
| } | |
| EXPORT_SYMBOL(snappy_uncompress); | |
| #endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment