{"record":{"id":"73bc52b577c79aad","repo":"nodejs/node","slug":"reason-extra-input-n","errorCode":null,"errorMessage":"reason: extra input\\n","messagePattern":"reason: extra input\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"deps/brotli/c/tools/brotli.c","lineNumber":1278,"sourceCode":"          context->next_in = context->input;\n          context->available_in = 1;\n        }\n      }\n      if (has_more_input) {\n        if (context->allow_concatenated) {\n          if (context->verbosity > 0) {\n            fprintf(stderr, \"extra input\\n\");\n          }\n          if (!ProvideOutput(context)) return BROTLI_FALSE;\n          BrotliDecoderDestroyInstance(context->decoder);\n          context->decoder = NULL;\n          if (!InitDecoder(context)) return BROTLI_FALSE;\n          s = context->decoder;\n        } else {\n          fprintf(stderr, \"corrupt input [%s]\\n\",\n                  PrintablePath(context->current_input_path));\n          if (context->verbosity > 0) {\n            fprintf(stderr, \"reason: extra input\\n\");\n          }\n          return BROTLI_FALSE;\n        }\n      } else {\n        if (context->verbosity > 0) {\n          context->end_time = clock();\n          fprintf(stderr, \"Decompressed \");\n          PrintFileProcessingProgress(context);\n          fprintf(stderr, \"\\n\");\n        }\n        /* Final check */\n        if (context->comment_state != COMMENT_OK) {\n          fprintf(stderr, \"corrupt input [%s]\\n\",\n                  PrintablePath(context->current_input_path));\n          if (context->verbosity > 0) {\n            fprintf(stderr, \"reason: comment mismatch\\n\");\n          }\n        }","sourceCodeStart":1260,"sourceCodeEnd":1296,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/brotli/c/tools/brotli.c#L1260-L1296","documentation":"Verbose diagnostic at brotli.c:1278, printed only when verbosity > 0, immediately after the 'corrupt input' message at line 1275. It specifies that the corruption was trailing data after a complete brotli stream (extra input) when allow_concatenated is false. This distinguishes it from truncated or comment-mismatch causes.","triggerScenarios":"Same condition as error 725: extra bytes follow a successfully decoded brotli stream while allow_concatenated is disabled. This message appears only when the user ran with -v (verbosity > 0).","commonSituations":"A developer debugging a 'corrupt input' failure runs 'brotli -d -v file.br' and sees 'reason: extra input', revealing that the file has trailing data beyond the brotli stream boundary. The file may have been packaged with extra metadata, footers, or was accidentally concatenated.","solutions":["Use the 'extra input' diagnosis to investigate trailing bytes in the file.","Enable concatenated-stream mode if the trailing data is another valid brotli stream.","Strip non-brotli trailing bytes before decompression.","Re-examine the compression pipeline to ensure no extra data is appended to the .br output."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Verbose diagnostic for error 725. Same prevention: ensure no trailing\n// non-brotli data when allow_concatenated is disabled.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use -v to confirm the root cause is trailing data, then strip it or enable concatenated mode.","Inspect files with a hex dump (xxd) to identify unexpected trailing bytes.","Document file format boundaries when wrapping brotli streams in custom containers."],"tags":["brotli","decompression","verbose","extra-input","diagnostic"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}