MCPcopy Create free account
hub / github.com/apache/httpd / ajp_msg_get_bytes

Function ajp_msg_get_bytes

modules/proxy/ajp_msg.c:535–555  ·  view source on GitHub ↗

* Get a Byte array from AJP Message * * @param msg AJP Message to get value from * @param rvalue Pointer where value will be returned * @param rvalueLen Pointer where Byte array len will be returned * @return APR_SUCCESS or error */

Source from the content-addressed store, hash-verified

533 * @return APR_SUCCESS or error
534 */
535apr_status_t ajp_msg_get_bytes(ajp_msg_t *msg, apr_byte_t **rvalue,
536 apr_size_t *rvalue_len)
537{
538 apr_uint16_t size;
539 apr_size_t start;
540 apr_status_t status;
541
542 status = ajp_msg_get_uint16(msg, &size);
543 /* save the current position */
544 start = msg->pos;
545
546 if ((status != APR_SUCCESS) || (size + start > msg->max_size)) {
547 return ajp_log_overflow(msg, "ajp_msg_get_bytes");
548 }
549 msg->pos += (apr_size_t)size; /* only bytes, no trailer */
550
551 *rvalue = msg->buf + start;
552 *rvalue_len = size;
553
554 return APR_SUCCESS;
555}
556
557
558/**

Callers

nothing calls this directly

Calls 2

ajp_msg_get_uint16Function · 0.85
ajp_log_overflowFunction · 0.85

Tested by

no test coverage detected