mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
LibCrypto: This method wrote to a const pointer.
This commit is contained in:
parent
7f70a6f0cb
commit
68cf22d580
2 changed files with 4 additions and 2 deletions
|
@ -67,8 +67,9 @@ public:
|
||||||
static SignedBigInteger import_data(const u8* ptr, size_t length);
|
static SignedBigInteger import_data(const u8* ptr, size_t length);
|
||||||
|
|
||||||
size_t export_data(AK::ByteBuffer& data) const;
|
size_t export_data(AK::ByteBuffer& data) const;
|
||||||
size_t export_data(const u8* ptr, size_t length) const
|
size_t export_data(u8* ptr, size_t length) const
|
||||||
{
|
{
|
||||||
|
// Note: ByteBuffer::wrap() does a const_cast!
|
||||||
auto buffer = ByteBuffer::wrap(ptr, length);
|
auto buffer = ByteBuffer::wrap(ptr, length);
|
||||||
return export_data(buffer);
|
return export_data(buffer);
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,8 +59,9 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t export_data(AK::ByteBuffer& data) const;
|
size_t export_data(AK::ByteBuffer& data) const;
|
||||||
size_t export_data(const u8* ptr, size_t length) const
|
size_t export_data(u8* ptr, size_t length) const
|
||||||
{
|
{
|
||||||
|
// Note: ByteBuffer::wrap() does a const_cast!
|
||||||
auto buffer = ByteBuffer::wrap(ptr, length);
|
auto buffer = ByteBuffer::wrap(ptr, length);
|
||||||
return export_data(buffer);
|
return export_data(buffer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue