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

Function ajp_msg_get_uint32

modules/proxy/ajp_msg.c:394–409  ·  view source on GitHub ↗

* Get a 32bits unsigned value from AJP Message * * @param msg AJP Message to get value from * @param rvalue Pointer where value will be returned * @return APR_SUCCESS or error */

Source from the content-addressed store, hash-verified

392 * @return APR_SUCCESS or error
393 */
394apr_status_t ajp_msg_get_uint32(ajp_msg_t *msg, apr_uint32_t *rvalue)
395{
396 apr_uint32_t value;
397
398 if ((msg->pos + 3) >= msg->len) {
399 return ajp_log_overflow(msg, "ajp_msg_get_uint32");
400 }
401
402 value = ((msg->buf[(msg->pos++)] & 0xFF) << 24);
403 value |= ((msg->buf[(msg->pos++)] & 0xFF) << 16);
404 value |= ((msg->buf[(msg->pos++)] & 0xFF) << 8);
405 value |= ((msg->buf[(msg->pos++)] & 0xFF));
406
407 *rvalue = value;
408 return APR_SUCCESS;
409}
410
411
412/**

Callers

nothing calls this directly

Calls 1

ajp_log_overflowFunction · 0.85

Tested by

no test coverage detected