Linux: GateMP: Check for Proper NameServer Value Length
[ipc/ipcdev.git] / linux / src / api / gates / GateMP.c
index e71629dd1dbfec212fe47dcd7df062a268bdd36f..9a0024fc45fde665df8a68f884d8961e7b3330d6 100644 (file)
@@ -390,6 +390,12 @@ Int GateMP_open(String name, GateMP_Handle *handle)
             *handle = NULL;
             status = GateMP_E_NOTFOUND;
         }
+        else if (len != sizeof(nsValue)) {
+            *handle = NULL;
+            status = GateMP_E_NOTFOUND;
+            PRINTVERBOSE0("GateMP configuration not valid for hostSupport. "
+                "Try adding hostSupport to your config if it is needed.\n");
+        }
         else {
             arg = nsValue[2];
             mask = nsValue[3];