{"record":{"id":"34ca8443483edce2","repo":"ruby/ruby","slug":"tar-is-corrupt-name-contains-null-byte","errorCode":null,"errorMessage":"tar is corrupt, name contains null byte","messagePattern":"tar is corrupt, name contains null byte","errorType":"exception","errorClass":"Gem::Package::TarInvalidError","httpStatus":null,"severity":"error","filePath":"lib/rubygems/package/tar_reader/entry.rb","lineNumber":93,"sourceCode":"  end\n\n  ##\n  # Are we at the end of the tar entry?\n\n  def eof?\n    check_closed\n\n    @read >= @header.size\n  end\n\n  ##\n  # Full name of the tar entry\n\n  def full_name\n    @header.full_name.force_encoding(Encoding::UTF_8)\n  rescue ArgumentError => e\n    raise unless e.message == \"string contains null byte\"\n    raise Gem::Package::TarInvalidError,\n          \"tar is corrupt, name contains null byte\"\n  end\n\n  ##\n  # Read one byte from the tar entry\n\n  def getc\n    return nil if eof?\n\n    ret = @io.getc\n    @read += 1 if ret\n\n    ret\n  end\n\n  ##\n  # Is this tar entry a directory?\n","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/ruby/ruby/blob/0e5b888e1c355f3f728f2659f085820937dada48/lib/rubygems/package/tar_reader/entry.rb#L75-L111","documentation":"Error \"tar is corrupt, name contains null byte\" thrown in ruby/ruby.","triggerScenarios":"Thrown at lib/rubygems/package/tar_reader/entry.rb:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0e5b888e1c355f3f728f2659f085820937dada48","analyzedAt":"2026-08-21T14:25:43.473Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}