-// Copyright 2019 The Chromium Authors. All rights reserved.
+// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <cstddef>
#include <limits>
+#include <ostream>
#include <type_traits>
+#include "base/check_op.h"
+#include "base/notreached.h"
#include "sql/recover_module/integers.h"
#include "sql/recover_module/payload.h"
#include "third_party/sqlite/sqlite3.h"
DCHECK(!header.has_inline_value);
uint8_t* const value_bytes = new uint8_t[size];
- if (!payload_reader_->ReadPayload(offset, size, value_bytes)) {
+ if (size > 0 && !payload_reader_->ReadPayload(offset, size, value_bytes)) {
delete[] value_bytes;
return false;
}
}
} // namespace recover
-} // namespace sql
\ No newline at end of file
+} // namespace sql