MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / setClumplets

Method setClumplets

src/jrd/CryptoManager.cpp:163–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161 }
162
163 void setClumplets(const ClumpletWriter& writer)
164 {
165 Ods::header_page* hdr = write();
166 UCHAR* const to = hdr->hdr_data;
167 UCHAR* const end = reinterpret_cast<UCHAR*>(hdr) + hdr->hdr_page_size;
168 const unsigned limit = (end - to) - 1;
169
170 const unsigned length = writer.getBufferLength();
171 fb_assert(length <= limit);
172 if (length > limit)
173 Arg::Gds(isc_hdr_overflow).raise();
174
175 memcpy(to, writer.getBuffer(), length);
176 to[length] = Ods::HDR_end;
177 hdr->hdr_end = HDR_SIZE + length;
178 }
179
180 ~CchHdr()
181 {

Callers 3

changeCryptStateMethod · 0.80
writeDbHeaderMethod · 0.80
digitalySignDatabaseMethod · 0.80

Calls 4

GdsClass · 0.85
getBufferLengthMethod · 0.45
raiseMethod · 0.45
getBufferMethod · 0.45

Tested by

no test coverage detected