Files
datastore/base/poco
Nikita FomichevandClaude Sonnet 4.6 caf049ff00 fix: guard memcpy against null _ptr in Poco::Buffer::setCapacity
When a Buffer is default-constructed (_ptr = nullptr, _used = 0),
calling setCapacity with newCapacity > 0 and preserveContent = true
computes newSz = 0 and then calls memcpy(dst, nullptr, 0).

Passing a null pointer to memcpy is undefined behaviour even when size
is 0 (the nonnull attribute on argument 2 applies regardless of size).
UBSan correctly flags this and with abort_on_error=1 the ClickHouse
server process aborts during Poco::CompressedLogFile construction
before binding port 9000, causing integration tests to time out.

Fix: skip the memcpy when newSz == 0.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <[email protected]>
2026-03-19 14:23:52 +01:00
..
2026-01-07 16:30:57 +01:00
2025-11-12 16:42:05 +01:00
2026-02-09 18:21:32 +01:00
2026-01-26 22:31:19 +01:00
2025-04-10 21:32:57 +02:00
2023-02-08 12:04:11 +01:00
2025-02-13 16:07:24 +00:00

alt text

Travis Build Status Build status CII Best Practices

POCO (Portable Components) C++ Libraries are:

  • A collection of C++ class libraries, conceptually similar to the Java Class Library, the .NET Framework or Apple's Cocoa.
  • Focused on solutions to frequently-encountered practical problems.
  • Focused on 'internet-age' network-centric applications.
  • Written in efficient, modern, 100% ANSI/ISO Standard C++.
  • Based on and complementing the C++ Standard Library/STL.
  • Highly portable and available on many different platforms, from embedded to server.
  • Open Source, licensed under the Boost Software License.

alt text


To start using POCO, see the Guided Tour and Getting Started documents.


POCO has an active user and contributing community, please visit our web site and blog. Answers to POCO-related questions can also be found on Stack Overflow.

Please see CONTRIBUTING for submitting contributions, bugs reports, feature requests or security issues.


In regards to Boost, in spite of some functional overlapping, POCO is best thought of as a Boost complement (rather than replacement). Side-by-side use of Boost and POCO is a very common occurrence.