bugfix: stat handler wasn't copying properly
The stat handler for metadata wasn't copying the bytes properly.
Tested: Verified it no longer excepts during real-use and returns the
correct contents.
Change-Id: I93a67d7668fde2342e861027dbb0b8e11ae4cb96
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/src/ipmiblob/blob_handler.cpp b/src/ipmiblob/blob_handler.cpp
index 8ec3f9c..b91b775 100644
--- a/src/ipmiblob/blob_handler.cpp
+++ b/src/ipmiblob/blob_handler.cpp
@@ -233,7 +233,7 @@
std::uint8_t len = resp[offset];
if (len > 0)
{
- std::copy(&resp[offset + 1], &resp[resp.size()],
+ std::copy(resp.begin() + offset + sizeof(len), resp.end(),
std::back_inserter(meta.metadata));
}