mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 20:59:45 +01:00
2118943 ] out_of_bound access in Poco::Data::BLOB:rawContent
This commit is contained in:
@@ -98,6 +98,8 @@ public:
|
|||||||
|
|
||||||
const char* rawContent() const;
|
const char* rawContent() const;
|
||||||
/// Returns the raw content.
|
/// Returns the raw content.
|
||||||
|
///
|
||||||
|
/// If the BLOB is empty, returns NULL.
|
||||||
|
|
||||||
void assignRaw(const char* pChar, std::size_t count);
|
void assignRaw(const char* pChar, std::size_t count);
|
||||||
/// Assigns raw content to internal storage.
|
/// Assigns raw content to internal storage.
|
||||||
@@ -136,7 +138,9 @@ inline const std::vector<char>& BLOB::content() const
|
|||||||
|
|
||||||
inline const char* BLOB::rawContent() const
|
inline const char* BLOB::rawContent() const
|
||||||
{
|
{
|
||||||
poco_assert (_pContent->size());
|
if (_pContent->empty())
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
return &(*_pContent)[0];
|
return &(*_pContent)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user