Fix pointer arithmetic instead of concat
`"my number " + 5` does not produces `"my number 5"` but rather `"mber "`.
If the number was greater than `len(string) + 2`
(pointing to the \0 and one past the end in authorized, more in UB)
the result would have been undefined behaviour.
Transforme the number to std::string using toString.
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
diff --git a/parameter/Subsystem.cpp b/parameter/Subsystem.cpp
index 28faa01..fc54695 100644
--- a/parameter/Subsystem.cpp
+++ b/parameter/Subsystem.cpp
@@ -440,7 +440,7 @@
pSubsystemObjectCreator->getMaxConfigurableElementSize()) {
string strSizeError = "Size should not exceed " +
- pSubsystemObjectCreator->getMaxConfigurableElementSize();
+ toString(pSubsystemObjectCreator->getMaxConfigurableElementSize());
strError = getMappingError(strKey, strSizeError, pInstanceConfigurableElement);