complex substitutions inside complex substitutions (both using ADELIM) read past allocated memory

Bug #1453827 reported by Thorsten Glaser on 2015-05-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mksh
Critical
Thorsten Glaser

Bug Description

Reproducer:

valgrind --track-origins=yes --leak-check=no b/mksh -c 'foo=${bar//baz/${sum:1}}'

This seems to be a nesting problem. A closing ADELIM omits the CSUBST, which also irritates wdscan (which seems flakey anyway), which is what the substitution uses.

Workaround: use temporary variables.

Changed in mksh:
status: New → Triaged
importance: Undecided → Critical
Thorsten Glaser (mirabilos) wrote :

Committed revision 1005698219A4D72938C.

Changed in mksh:
assignee: nobody → Thorsten Glaser (mirabilos)
status: Triaged → Fix Committed
Changed in mksh:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers