>Number:         4271
>Category:       other
>Synopsis:       wrong number of bytes copied in read_connection() in 
>src/support/ab.c
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Apr 19 07:20:01 PDT 1999
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        1.3
>Environment:
all
>Description:
instead of using 'space' for the number of bytes to copy in the
calls to memcpy(), use 'tocopy'.
>How-To-Repeat:

>Fix:
*** ab.c        Mon Apr  5 15:12:52 1999
--- ab.c.new    Mon Apr 19 09:59:31 1999
***************
*** 627,639 ****
        int l = 4;
        int space = CBUFFSIZE - c->cbx - 1;     /* -1 to allow for 0
                                                 * terminator */
        int tocopy = (space < r) ? space : r;
  #ifndef CHARSET_EBCDIC
!       memcpy(c->cbuff + c->cbx, buffer, space);
  #else                         /* CHARSET_EBCDIC */
!       ascii2ebcdic(c->cbuff + c->cbx, buffer, space);
  #endif                                /* CHARSET_EBCDIC */
        c->cbx += tocopy;
        space -= tocopy;
        c->cbuff[c->cbx] = 0;   /* terminate for benefit of strstr */
        if (verbosity >= 4) {
--- 627,639 ----
        int l = 4;
        int space = CBUFFSIZE - c->cbx - 1;     /* -1 to allow for 0
                                                 * terminator */
        int tocopy = (space < r) ? space : r;
  #ifndef CHARSET_EBCDIC
!       memcpy(c->cbuff + c->cbx, buffer, tocopy);
  #else                         /* CHARSET_EBCDIC */
!       ascii2ebcdic(c->cbuff + c->cbx, buffer, tocopy);
  #endif                                /* CHARSET_EBCDIC */
        c->cbx += tocopy;
        space -= tocopy;
        c->cbuff[c->cbx] = 0;   /* terminate for benefit of strstr */
        if (verbosity >= 4) {
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]



Reply via email to