tool_brotli.patch 899 B

123456789101112131415161718192021
  1. diff --git a/c/tools/brotli.c b/c/tools/brotli.c
  2. index 7c678d3..8f55f2f 100644
  3. --- a/c/tools/brotli.c
  4. +++ b/c/tools/brotli.c
  5. @@ -876,6 +876,7 @@ static void PrintFileProcessingProgress(Context* context) {
  6. }
  7. static BROTLI_BOOL DecompressFile(Context* context, BrotliDecoderState* s) {
  8. + int has_more_input;
  9. BrotliDecoderResult result = BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT;
  10. InitializeBuffers(context);
  11. for (;;) {
  12. @@ -890,7 +891,7 @@ static BROTLI_BOOL DecompressFile(Context* context, BrotliDecoderState* s) {
  13. if (!ProvideOutput(context)) return BROTLI_FALSE;
  14. } else if (result == BROTLI_DECODER_RESULT_SUCCESS) {
  15. if (!FlushOutput(context)) return BROTLI_FALSE;
  16. - int has_more_input =
  17. + has_more_input =
  18. (context->available_in != 0) || (fgetc(context->fin) != EOF);
  19. if (has_more_input) {
  20. fprintf(stderr, "corrupt input [%s]\n",