Skip to content

Commit

Permalink
don't use memcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Jan 11, 2024
1 parent a47a3ab commit 9b64996
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions r/adbcdrivermanager/src/driver_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,7 @@ class ObjectBase {

AdbcStatusCode CSetOptionBytes(const char* key, const uint8_t* value, size_t length,
AdbcError* error) {
std::vector<uint8_t> cppvalue(length);
memcpy(cppvalue.data(), value, length);

std::vector<uint8_t> cppvalue(value, value + length);
Option option(cppvalue);
return SetOption(key, option);
}
Expand Down

0 comments on commit 9b64996

Please sign in to comment.