in source/sigv4.c [2526:2554]
static SigV4Status_t writeLineToCanonicalRequest( const char * pLine,
size_t lineLen,
CanonicalContext_t * pCanonicalContext )
{
SigV4Status_t returnStatus = SigV4Success;
assert( pLine != NULL );
assert( pCanonicalContext != NULL );
/* Make sure that there is space for the Method and the newline character.*/
if( pCanonicalContext->bufRemaining < ( lineLen + 1U ) )
{
returnStatus = SigV4InsufficientMemory;
}
else
{
( void ) memcpy( ( char * ) &( pCanonicalContext->pBufProcessing[ pCanonicalContext->uxCursorIndex ] ),
pLine,
lineLen );
pCanonicalContext->uxCursorIndex += lineLen;
( ( char * ) ( pCanonicalContext->pBufProcessing ) )[ pCanonicalContext->uxCursorIndex ] = LINEFEED_CHAR;
pCanonicalContext->uxCursorIndex++;
pCanonicalContext->bufRemaining -= ( lineLen + 1U );
}
return returnStatus;
}