summaryrefslogtreecommitdiff
path: root/sal/osl/w32/procimpl.cxx
diff options
context:
space:
mode:
authorsb <sb@openoffice.org>2010-03-02 15:37:18 +0100
committersb <sb@openoffice.org>2010-03-02 15:37:18 +0100
commite3f6821818e5071dbc5d407b2887ca28c3da02a8 (patch)
tree753f8715b2c94c18a3bd31724ef421f87486c300 /sal/osl/w32/procimpl.cxx
parent6a6e7cf016932e6950adba73b8c3efe8f91eb2f1 (diff)
sb118: vector::resize instead of vector::reserve to not access elements beyond vector::size
Diffstat (limited to 'sal/osl/w32/procimpl.cxx')
-rw-r--r--sal/osl/w32/procimpl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx
index 2eb22829e..a2e645426 100644
--- a/sal/osl/w32/procimpl.cxx
+++ b/sal/osl/w32/procimpl.cxx
@@ -204,9 +204,9 @@ namespace /* private */
if (!create_merged_environment(environment_vars, n_environment_vars, &merged_env))
return false;
- // reserve enough space for the '\0'-separated environment strings and
+ // allocate enough space for the '\0'-separated environment strings and
// a final '\0'
- environment.reserve(calc_sum_of_string_lengths(merged_env) + 1);
+ environment.resize(calc_sum_of_string_lengths(merged_env) + 1);
string_container_const_iterator_t iter = merged_env.begin();
string_container_const_iterator_t iter_end = merged_env.end();