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

Function getLen

src/common/StatementMetadata.cpp:492–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490
491
492static USHORT getLen(const UCHAR** ptr, const UCHAR* bufferEnd)
493{
494 if (bufferEnd - *ptr < 2)
495 fatal_exception::raise("Invalid info structure - no space for clumplet length");
496
497 const USHORT len = static_cast<USHORT>(gds__vax_integer(*ptr, 2));
498 *ptr += 2;
499
500 fb_assert(bufferEnd - *ptr >= len);
501 if (bufferEnd - *ptr < len)
502 fatal_exception::raiseFmt("Invalid info structure - no space for clumplet data: need %d, actual %d",
503 len, bufferEnd - *ptr);
504
505 return len;
506}
507
508
509// Pick up a VAX format numeric info item with a 2 byte length.

Callers 2

getNumericInfoFunction · 0.85
getStringInfoFunction · 0.85

Calls 1

raiseFunction · 0.85

Tested by

no test coverage detected