Project

Profile

Help

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...

Bug #824076

secfile_replace_str_vec() gives corrupt results

Added by Marko Lindqvist over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
General
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

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.


Related issues

Blocks Freeciv - Feature #821916: Rename "Mine TF" action enabler as "Plant"Closed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Marko Lindqvist over 1 year ago

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.

#2 Updated by Marko Lindqvist over 1 year ago

#3 Updated by Marko Lindqvist over 1 year ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF