}
else if(smtp->eob) {
/* A previous substring matched so output that first */
- memcpy(&scratch[si], SMTP_EOB + eob_sent, smtp->eob - eob_sent);
+ memcpy(&scratch[si], &SMTP_EOB[eob_sent], smtp->eob - eob_sent);
si += smtp->eob - eob_sent;
/* Then compare the first byte */
/* Do we have a match for CRLF. as per RFC-5321, sect. 4.5.2 */
if(SMTP_EOB_FIND_LEN == smtp->eob) {
/* Copy the replacement data to the target buffer */
- memcpy(&scratch[si], SMTP_EOB_REPL + eob_sent,
+ memcpy(&scratch[si], &SMTP_EOB_REPL[eob_sent],
SMTP_EOB_REPL_LEN - eob_sent);
si += SMTP_EOB_REPL_LEN - eob_sent;
smtp->eob = 0;
if(smtp->eob - eob_sent) {
/* A substring matched before processing ended so output that now */
- memcpy(&scratch[si], SMTP_EOB + eob_sent, smtp->eob - eob_sent);
+ memcpy(&scratch[si], &SMTP_EOB[eob_sent], smtp->eob - eob_sent);
si += smtp->eob - eob_sent;
}