Skip to content

Buffer<> swap miss ownMem #1964

@fenghao119

Description

@fenghao119

Expected behavior

Buffer<> swap all members

Actual behavior

Buffer<> swap don't swap _ownMem member, maybe crash

Steps to reproduce the problem

(please make this a SSCCE, if applicable and reasonable)
test code:

void test() {
  char my[16];
  Poco::Buffer<char> buffer(16);
  Poco::Buffer<char> wrapper(my, sizeof(my));
  buffer.swap(wrapper);
}

test(); // crash 

POCO version

1.7.9

Compiler and version

all

Operating system and version

all

Other relevant inofrmation

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions