HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
secfile_replace_str_vec() gives corrupt results
Seen with Feature #821916 (also with code modified from the patch attached to that ticket)
secfile_replace_str_vec() does not work as expected. Results are corrupted. Writing the very same vector with secfile_insert_str_vec() gives sensible results, so the problem is confirmed not to be in the vector being written.
#1 Updated by Marko Lindqvist over 1 year ago
- File 0049-entry_str_set-Free-old-entry-only-after-allocating-a.patch 0049-entry_str_set-Free-old-entry-only-after-allocating-a.patch added
- Category set to General
- Status changed from New to Resolved
- Sprint/Milestone set to 2.6.1
The problem was that the caller wanted to keep some of the entries from the original vector intact. The replacement did free() to the old strings, thus losing them, before they were placed to the newly allocated entries.
Attached patch makes secfile_replace_str_vec() to support usage like that. Targeting also to stable branches to make sure no future master bugfix that uses this cause problems in earlier branches if backported.