summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-05-07 11:04:35 -0700
committerPatrick Venture <venture@google.com>2019-05-07 18:14:47 +0000
commitd39b6f834f2261330fce66b88b8fa3834e561379 (patch)
treedcfb32fd877c324694bb554c1f21429ccdf743d8
parent17186aef0f34373c0da0832de6525e67d1bc1b09 (diff)
downloadipmi-blob-tool-d39b6f834f2261330fce66b88b8fa3834e561379.tar.gz
ipmi-blob-tool-d39b6f834f2261330fce66b88b8fa3834e561379.zip
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>
-rw-r--r--src/ipmiblob/blob_handler.cpp2
1 files changed, 1 insertions, 1 deletions
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 @@ StatResponse BlobHandler::statGeneric(BlobOEMCommands command,
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));
}
OpenPOWER on IntegriCloud