summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-06-20 12:09:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-06-20 14:44:05 +0200
commit97beabccb73321a8d2e022705afa755f15e99fa0 (patch)
tree546ea4854a05f14841131f79a53d3514e667e0aa /vcl
parentc0823c29a053011daa563183d7bc46add9b88eec (diff)
Work around false valgrind warning about optimized strlen implementation
...that reads in word sized chunks and thus can read past the nominal end of a memory buffer. Also, the return type of rtl_str_getLength (sal_Int32) fits better with the type of SmPropValue.length (int) than the return type of strlen (size_t). Change-Id: I7ff91408b4c6d8c9913cede516586f42b8349ed3
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/generic/app/sm.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index 185e550355cf..a897805b9b62 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -220,7 +220,7 @@ static void BuildSmPropertyList()
pSmProps[ 3 ].num_vals = 1;
pSmProps[ 3 ].vals = new SmPropValue;
pSmProps[ 3 ].vals->value = strdup( aUser.getStr() );
- pSmProps[ 3 ].vals->length = strlen( (char *)pSmProps[ 3 ].vals->value )+1;
+ pSmProps[ 3 ].vals->length = rtl_str_getLength( (char *)pSmProps[ 3 ].vals->value )+1;
pSmProps[ 4 ].name = const_cast<char*>(SmRestartStyleHint);
pSmProps[ 4 ].type = const_cast<char*>(SmCARD8);