Skip to content

Commit e26ed1f

Browse files
committed
* Compare the source buffers usage with the destination buffers size.
This is just hardening as the code is currently not used. Submitted by: Elhanan Haenel <elhanan.haenel@gmail.com> Reviewed by: rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1932498 13f79535-47bb-0310-9956-ffa450edef68
1 parent cd8dda5 commit e26ed1f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*) mod_proxy_ajp: Fix a wrong comparison in ajp_msg_copy.
2+
[Elhanan Haenel <elhanan.haenel@gmail.com>]

modules/proxy/ajp_msg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ apr_status_t ajp_msg_create(apr_pool_t *pool, apr_size_t size, ajp_msg_t **rmsg)
582582
*/
583583
apr_status_t ajp_msg_copy(ajp_msg_t *smsg, ajp_msg_t *dmsg)
584584
{
585-
if (smsg->len > smsg->max_size) {
585+
if (smsg->len > dmsg->max_size) {
586586
ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, APLOGNO(01082)
587587
"ajp_msg_copy(): destination buffer too "
588588
"small %" APR_SIZE_T_FMT ", max size is %" APR_SIZE_T_FMT,

0 commit comments

Comments
 (0)