summaryrefslogtreecommitdiff
path: root/sal
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
commit7b673e59fcf8045e135c854bdfe14fce97df0432 (patch)
treeb6e5bff8d197500e87f7da5032adbf6ad367e021 /sal
parent80b39c82606e372f298cdf3c715277b14d3014bd (diff)
sb118: vector::resize instead of vector::reserve to not access elements beyond vector::size
Diffstat (limited to 'sal')
-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 075106b72432..fc04d5b84a8f 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();