PEL:  Pad UserData section to 4 byte boundary

The spec says that all section sizes must be a
multiple of 4 bytes, so pad the User Data section that
contains the AdditionalData JSON out to that.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I30b46a34604ee10d67755f51fd7d9c41b2f75c9f
diff --git a/extensions/openpower-pels/pel.cpp b/extensions/openpower-pels/pel.cpp
index 2345e0e..e006541 100644
--- a/extensions/openpower-pels/pel.cpp
+++ b/extensions/openpower-pels/pel.cpp
@@ -195,6 +195,12 @@
     auto jsonString = json.dump();
     std::vector<uint8_t> jsonData(jsonString.begin(), jsonString.end());
 
+    // Pad to a 4 byte boundary
+    while ((jsonData.size() % 4) != 0)
+    {
+        jsonData.push_back(0);
+    }
+
     return std::make_unique<UserData>(
         static_cast<uint16_t>(ComponentID::phosphorLogging),
         static_cast<uint8_t>(UserDataFormat::json),