Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
briar
briar
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 677
    • Issues 677
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 10
    • Merge Requests 10
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • briar
  • briarbriar
  • Issues
  • #1433

Closed
Open
Opened Oct 29, 2018 by akwizgran@akwizgranOwner
  • Report abuse
  • New issue
Report abuse New issue

BdfReaderImpl has undefined behaviour for strings with illegal byte sequences

BdfReaderImpl uses the String(byte[] bytes, int offset, int length, String charsetName) constructor to convert UTF-8 byte arrays into strings. The javadoc says "The behavior of this constructor when the given bytes are not valid in the given charset is unspecified. The CharsetDecoder class should be used when more control over the decoding process is required."

We have a StringUtils.toUtf8(byte[] bytes) method with well-defined behaviour for this situation (illegal byte sequences are ignored), which we should probably be using here (and fuzz-testing).

Assignee
Assign to
Android 1.1
Milestone
Android 1.1
Assign milestone
Time tracking
None
Due date
None
Reference: briar/briar#1433