diff --git a/slp_parser.cpp b/slp_parser.cpp
index 293cba7..b79cff2 100644
--- a/slp_parser.cpp
+++ b/slp_parser.cpp
@@ -68,19 +68,30 @@
 
         langtagLen = endian::from_network(langtagLen);
 
-        req.header.langtag.insert(
-            0, (const char*)buff.data() + slp::header::OFFSET_LANG, langtagLen);
-
-        /* check for the validity of the function */
-        if (req.header.functionID <
-                static_cast<uint8_t>(slp::FunctionType::SRVRQST) ||
-            req.header.functionID >
-                static_cast<uint8_t>(slp::FunctionType::SAADV))
+        // Enforce language tag size limits
+        if ((slp::header::OFFSET_LANG + langtagLen) > buff.size())
         {
-            std::cerr << "Invalid function ID: " << req.header.functionID
+            std::cerr << "Invalid Language Tag Length: " << langtagLen
                       << std::endl;
             rc = static_cast<int>(slp::Error::PARSE_ERROR);
         }
+        else
+        {
+            req.header.langtag.insert(
+                0, (const char*)buff.data() + slp::header::OFFSET_LANG,
+                langtagLen);
+
+            /* check for the validity of the function */
+            if (req.header.functionID <
+                    static_cast<uint8_t>(slp::FunctionType::SRVRQST) ||
+                req.header.functionID >
+                    static_cast<uint8_t>(slp::FunctionType::SAADV))
+            {
+                std::cerr << "Invalid function ID: " << req.header.functionID
+                          << std::endl;
+                rc = static_cast<int>(slp::Error::PARSE_ERROR);
+            }
+        }
     }
 
     return std::make_tuple(rc, std::move(req));
diff --git a/test/slp_parser_test.cpp b/test/slp_parser_test.cpp
index 3615c93..338b214 100644
--- a/test/slp_parser_test.cpp
+++ b/test/slp_parser_test.cpp
@@ -40,3 +40,29 @@
 
     EXPECT_NE(rc, 0);
 }
+
+TEST(parseHeaderTest, ValidLangTagLength)
+{
+    // Language Tag Length that is valid
+    slp::buffer testData{0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                         0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00};
+
+    slp::Message req;
+    int rc = slp::SUCCESS;
+    std::tie(rc, req) = slp::parser::internal::parseHeader(testData);
+
+    EXPECT_EQ(rc, 0);
+}
+
+TEST(parseHeaderTest, InvalidLangTagLength)
+{
+    // Language Tag Length that is too big
+    slp::buffer testData{0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                         0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00};
+
+    slp::Message req;
+    int rc = slp::SUCCESS;
+    std::tie(rc, req) = slp::parser::internal::parseHeader(testData);
+
+    EXPECT_NE(rc, 0);
+}
