diff options
author | Patrick Venture <venture@google.com> | 2019-05-07 11:04:35 -0700 |
---|---|---|
committer | Patrick Venture <venture@google.com> | 2019-05-07 18:14:47 +0000 |
commit | d39b6f834f2261330fce66b88b8fa3834e561379 (patch) | |
tree | dcfb32fd877c324694bb554c1f21429ccdf743d8 /src | |
parent | 17186aef0f34373c0da0832de6525e67d1bc1b09 (diff) | |
download | ipmi-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>
Diffstat (limited to 'src')
-rw-r--r-- | src/ipmiblob/blob_handler.cpp | 2 |
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)); } |