Fixed server crash when we had less than MAX header options
authorErich Keane <erich.keane@intel.com>
Thu, 23 Oct 2014 19:42:06 +0000 (12:42 -0700)
committerErich Keane <erich.keane@intel.com>
Thu, 23 Oct 2014 19:42:06 +0000 (12:42 -0700)
Change-Id: I16a7a1c1049869bd2c26dcec903c2b3f82c11bfb

src/InProcServerWrapper.cpp

index f1f8214..6f68b1a 100644 (file)
@@ -76,7 +76,9 @@ void formResourceRequest(OCEntityHandlerFlag flag,
                 std::string optionData;
                 HeaderOptions headerOptions;
 
-                for(int i = 0; i < MAX_HEADER_OPTIONS; i++)
+                for(int i = 0;
+                    i < entityHandlerRequest->numRcvdVendorSpecificHeaderOptions;
+                    i++)
                 {
                     optionID = entityHandlerRequest->rcvdVendorSpecificHeaderOptions[i].optionID;
                     optionData = reinterpret_cast<const char*>