mate-desktop / pluma

A powerful text editor for MATE
http://www.mate-desktop.org
GNU General Public License v2.0
156 stars 64 forks source link

Replace All with Invalid Escape Sequences in Regex Mode cause segfaults #602

Open byteit101 opened 3 years ago

byteit101 commented 3 years ago

Expected behaviour

Pluma should never segfault

Actual behaviour

Pluma segfaults

Steps to reproduce the behaviour

  1. Open new Pluma instace
  2. Enter text containing at least one double quote (")
  3. Open the find and replace dialog (ctrl-h)
  4. Search for "
  5. Replace with \"
  6. Match Regular Expression, Wrap around, and Parse Escape Sequences should all be checked, others unchecked.
  7. Press Replace All
  8. BOOM

Note that pressing Replace Instead of Replace All outputs this error:

** (pluma:6776): CRITICAL **: 10:33:05.136: replace_selected_text: assertion 'replace != NULL' failed

MATE general version

1.20.4

Package version

1.20.4-1

Linux Distribution

Debian 10