Skip to content
Snippets Groups Projects

Fix strip_quotes() to handle empty strings

Merged Christian Boltz requested to merge cboltz/apparmor:cboltz-strip-quotes-empty into master

strip_quotes() assumed its parameter is at least one character long, and errored out on an empty string.

It also converted a string consisting of a single quote to an empty string because that single quote had a quote as first and last char.

This commit fixes these two bugs.

Also rewrite TestStripQuotes to use tests[], and add some test for an empty string, a one-char path (just a slash) and a single quote.

I propose this patch for 2.11..master.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading