Commit 705e3f4
Fix UB introduced by copying detail::FormatListN objects. (#59)
When copying a detail::FormatListN object, the m_formatterStore must also be copied, otherwise the pointer in the parent FormatList class are possibly invalid.
This addresses the segfault explained in #58. The issue arises when makeFormatList returns an object which holds a pointer to memory created for the temporary object on the stack.1 parent 4d03ee3 commit 705e3f4
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
984 | 984 | | |
985 | 985 | | |
986 | 986 | | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
987 | 991 | | |
988 | 992 | | |
989 | 993 | | |
| |||
0 commit comments