diff --git a/platform-mc/terminus.cpp b/platform-mc/terminus.cpp
index 5b2ab3c..004158a 100644
--- a/platform-mc/terminus.cpp
+++ b/platform-mc/terminus.cpp
@@ -283,8 +283,7 @@
             }
             memcpy(alignedBuffer, ptr, u16NameStringLen * sizeof(uint16_t));
             std::u16string u16NameString(alignedBuffer, u16NameStringLen);
-            ptr += (u16NameString.size() + sizeof(nullTerminator)) *
-                   sizeof(uint16_t);
+            ptr += u16NameString.size() * sizeof(uint16_t);
             std::transform(u16NameString.cbegin(), u16NameString.cend(),
                            u16NameString.begin(),
                            [](uint16_t utf16) { return be16toh(utf16); });
diff --git a/platform-mc/test/terminus_test.cpp b/platform-mc/test/terminus_test.cpp
index 925f284..e4f00f9 100644
--- a/platform-mc/test/terminus_test.cpp
+++ b/platform-mc/test/terminus_test.cpp
@@ -108,6 +108,246 @@
     EXPECT_EQ("S0", t1.getTerminusName());
 }
 
+TEST(TerminusTest, parseSensorAuxiliaryMultiNamesPDRTest)
+{
+    auto t1 = pldm::platform_mc::Terminus(1,
+                                          1 << PLDM_BASE | 1 << PLDM_PLATFORM);
+    std::vector<uint8_t> pdr1{
+        0x0,
+        0x0,
+        0x0,
+        0x1,                             // record handle
+        0x1,                             // PDRHeaderVersion
+        PLDM_SENSOR_AUXILIARY_NAMES_PDR, // PDRType
+        0x0,
+        0x0,                             // recordChangeNumber
+        0x0,
+        53,                              // dataLength
+        0,
+        0x0,                             // PLDMTerminusHandle
+        0x1,
+        0x0,                             // sensorID
+        0x1,                             // sensorCount
+        0x3,                             // nameStringCount
+        'e',
+        'n',
+        0x0, // nameLanguageTag
+        0x0,
+        'T',
+        0x0,
+        'E',
+        0x0,
+        'M',
+        0x0,
+        'P',
+        0x0,
+        '1',
+        0x0,
+        0x0, // sensorName Temp1
+        'f',
+        'r',
+        0x0, // nameLanguageTag
+        0x0,
+        'T',
+        0x0,
+        'E',
+        0x0,
+        'M',
+        0x0,
+        'P',
+        0x0,
+        '2',
+        0x0,
+        0x0, // sensorName Temp2
+        'f',
+        'r',
+        0x0, // nameLanguageTag
+        0x0,
+        'T',
+        0x0,
+        'E',
+        0x0,
+        'M',
+        0x0,
+        'P',
+        0x0,
+        '1',
+        0x0,
+        '2',
+        0x0,
+        0x0 // sensorName Temp12
+    };
+
+    std::vector<uint8_t> pdr2{
+        0x1, 0x0, 0x0,
+        0x0,                             // record handle
+        0x1,                             // PDRHeaderVersion
+        PLDM_ENTITY_AUXILIARY_NAMES_PDR, // PDRType
+        0x1,
+        0x0,                             // recordChangeNumber
+        0x11,
+        0,                               // dataLength
+        /* Entity Auxiliary Names PDR Data*/
+        3,
+        0x80, // entityType system software
+        0x1,
+        0x0,  // Entity instance number =1
+        0,
+        0,    // Overal system
+        0,    // shared Name Count one name only
+        01,   // nameStringCount
+        0x65, 0x6e, 0x00,
+        0x00, // Language Tag "en"
+        0x53, 0x00, 0x30, 0x00,
+        0x00  // Entity Name "S0"
+    };
+
+    t1.pdrs.emplace_back(pdr1);
+    t1.pdrs.emplace_back(pdr2);
+    t1.parseTerminusPDRs();
+
+    auto sensorAuxNames = t1.getSensorAuxiliaryNames(0);
+    EXPECT_EQ(nullptr, sensorAuxNames);
+
+    sensorAuxNames = t1.getSensorAuxiliaryNames(1);
+    EXPECT_NE(nullptr, sensorAuxNames);
+
+    const auto& [sensorId, sensorCnt, names] = *sensorAuxNames;
+    EXPECT_EQ(1, sensorId);
+    EXPECT_EQ(1, sensorCnt);
+    EXPECT_EQ(1, names.size());
+    EXPECT_EQ(3, names[0].size());
+    EXPECT_EQ("en", names[0][0].first);
+    EXPECT_EQ("TEMP1", names[0][0].second);
+    EXPECT_EQ("fr", names[0][1].first);
+    EXPECT_EQ("TEMP2", names[0][1].second);
+    EXPECT_EQ("fr", names[0][2].first);
+    EXPECT_EQ("TEMP12", names[0][2].second);
+    EXPECT_EQ(2, t1.pdrs.size());
+    EXPECT_EQ("S0", t1.getTerminusName());
+}
+
+TEST(TerminusTest, parseSensorAuxiliaryNamesMultiSensorsPDRTest)
+{
+    auto t1 = pldm::platform_mc::Terminus(1,
+                                          1 << PLDM_BASE | 1 << PLDM_PLATFORM);
+    std::vector<uint8_t> pdr1{
+        0x0,
+        0x0,
+        0x0,
+        0x1,                             // record handle
+        0x1,                             // PDRHeaderVersion
+        PLDM_SENSOR_AUXILIARY_NAMES_PDR, // PDRType
+        0x0,
+        0x0,                             // recordChangeNumber
+        0x0,
+        54,                              // dataLength
+        0,
+        0x0,                             // PLDMTerminusHandle
+        0x1,
+        0x0,                             // sensorID
+        0x2,                             // sensorCount
+        0x1,                             // nameStringCount
+        'e',
+        'n',
+        0x0, // nameLanguageTag
+        0x0,
+        'T',
+        0x0,
+        'E',
+        0x0,
+        'M',
+        0x0,
+        'P',
+        0x0,
+        '1',
+        0x0,
+        0x0, // sensorName Temp1
+        0x2, // nameStringCount
+        'f',
+        'r',
+        0x0, // nameLanguageTag
+        0x0,
+        'T',
+        0x0,
+        'E',
+        0x0,
+        'M',
+        0x0,
+        'P',
+        0x0,
+        '2',
+        0x0,
+        0x0, // sensorName Temp2
+        'f',
+        'r',
+        0x0, // nameLanguageTag
+        0x0,
+        'T',
+        0x0,
+        'E',
+        0x0,
+        'M',
+        0x0,
+        'P',
+        0x0,
+        '1',
+        0x0,
+        '2',
+        0x0,
+        0x0 // sensorName Temp12
+    };
+
+    std::vector<uint8_t> pdr2{
+        0x1, 0x0, 0x0,
+        0x0,                             // record handle
+        0x1,                             // PDRHeaderVersion
+        PLDM_ENTITY_AUXILIARY_NAMES_PDR, // PDRType
+        0x1,
+        0x0,                             // recordChangeNumber
+        0x11,
+        0,                               // dataLength
+        /* Entity Auxiliary Names PDR Data*/
+        3,
+        0x80, // entityType system software
+        0x1,
+        0x0,  // Entity instance number =1
+        0,
+        0,    // Overal system
+        0,    // shared Name Count one name only
+        01,   // nameStringCount
+        0x65, 0x6e, 0x00,
+        0x00, // Language Tag "en"
+        0x53, 0x00, 0x30, 0x00,
+        0x00  // Entity Name "S0"
+    };
+
+    t1.pdrs.emplace_back(pdr1);
+    t1.pdrs.emplace_back(pdr2);
+    t1.parseTerminusPDRs();
+
+    auto sensorAuxNames = t1.getSensorAuxiliaryNames(0);
+    EXPECT_EQ(nullptr, sensorAuxNames);
+
+    sensorAuxNames = t1.getSensorAuxiliaryNames(1);
+    EXPECT_NE(nullptr, sensorAuxNames);
+
+    const auto& [sensorId, sensorCnt, names] = *sensorAuxNames;
+    EXPECT_EQ(1, sensorId);
+    EXPECT_EQ(2, sensorCnt);
+    EXPECT_EQ(2, names.size());
+    EXPECT_EQ(1, names[0].size());
+    EXPECT_EQ("en", names[0][0].first);
+    EXPECT_EQ("TEMP1", names[0][0].second);
+    EXPECT_EQ(2, names[1].size());
+    EXPECT_EQ("fr", names[1][0].first);
+    EXPECT_EQ("TEMP2", names[1][0].second);
+    EXPECT_EQ("fr", names[1][1].first);
+    EXPECT_EQ("TEMP12", names[1][1].second);
+    EXPECT_EQ(2, t1.pdrs.size());
+    EXPECT_EQ("S0", t1.getTerminusName());
+}
+
 TEST(TerminusTest, parsePDRTestNoSensorPDR)
 {
     auto t1 = pldm::platform_mc::Terminus(1,
