dsp: platform: Fix location of closing paren in overflow detection

I suspect this was the result of editor auto-parenthesis support and the
result got overlooked.

Add some tests while we're in the area.

As seems to be the case when we expand the tests associated with
argument values, also update the ABI dump to reflect the change in
recorded register allocation.

gitlint-ignore: UC1
Fixes: #13
Fixes: ad33b99abcc4 ("dsp: platform: Bounds check encode_state_effecter_pdr()")
Reported-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Change-Id: Iab4c1c337400678ac424936151a38baf0e0d554d
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/tests/dsp/platform.cpp b/tests/dsp/platform.cpp
index 9c44130..6f1c181 100644
--- a/tests/dsp/platform.cpp
+++ b/tests/dsp/platform.cpp
@@ -16,6 +16,68 @@
 
 constexpr auto hdrSize = sizeof(pldm_msg_hdr);
 
+TEST(StateEffecterPdr, testIncorrectInvocations)
+{
+    struct state_effecter_possible_states possible_states
+    {
+    };
+    struct pldm_state_effecter_pdr effecter
+    {
+    };
+    size_t actual_size;
+    int rc;
+
+    /* effecter can't be NULL */
+    rc = encode_state_effecter_pdr(NULL, 0, &possible_states, 1, &actual_size);
+    EXPECT_EQ(rc, PLDM_ERROR);
+
+    /* possible states size can't be NULL */
+    rc = encode_state_effecter_pdr(&effecter, sizeof(effecter), NULL, 0,
+                                   &actual_size);
+    EXPECT_EQ(rc, PLDM_ERROR);
+
+    /* possible states size can't be too large */
+    rc = encode_state_effecter_pdr(&effecter, sizeof(effecter),
+                                   &possible_states, SIZE_MAX, &actual_size);
+    EXPECT_EQ(rc, PLDM_ERROR);
+
+    /* actual size can't be NULL */
+    rc = encode_state_effecter_pdr(&effecter, sizeof(effecter),
+                                   &possible_states, 0, NULL);
+    EXPECT_EQ(rc, PLDM_ERROR);
+
+    /* allocation size can't be less than effecter size with possible states */
+    rc = encode_state_effecter_pdr(&effecter, 0, &possible_states, 1,
+                                   &actual_size);
+    EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
+
+    /* disallow mismatches between recorded possible state size and provided
+     * possible state size */
+    effecter.composite_effecter_count = 1;
+    rc = encode_state_effecter_pdr(&effecter, sizeof(effecter),
+                                   &possible_states, 1, &actual_size);
+    EXPECT_EQ(rc, PLDM_ERROR);
+    EXPECT_EQ(actual_size, 0);
+}
+
+TEST(StateEffecterPdr, testReasonableInvocations)
+{
+    struct state_effecter_possible_states possible_states
+    {
+    };
+    struct pldm_state_effecter_pdr effecter
+    {
+    };
+    size_t actual_size;
+    int rc;
+
+    /* Accept 0 possible states */
+    rc = encode_state_effecter_pdr(&effecter, sizeof(effecter),
+                                   &possible_states, 0, &actual_size);
+    EXPECT_EQ(rc, PLDM_SUCCESS);
+    EXPECT_EQ(actual_size, sizeof(effecter) - sizeof(effecter.possible_states));
+}
+
 TEST(SetStateEffecterStates, testEncodeResponse)
 {
     std::array<uint8_t,