Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • X xauth
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorgxorg
  • app
  • xauth
  • Merge requests
  • !3

Fix segmentation fault on invalid add argument.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Tobias Stoeckmann requested to merge tstoeckmann/xauth:quote into master May 03, 2020
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 1

The hex key supplied with an add command can be quoted, in which case the quotation marks are removed.

The check itself makes sure that a given string starts with a double quotation mark and ends with a double quotation mark.

Buf if only " is supplied, the code crashes because it subtracts 2 from the length (which is 1) and therefore copies too much memory into a 0 allocated memory area.

Proof of concept:

$ xauth add :0 0 "

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: quote