diff --git a/src/jrd/evl.cpp b/src/jrd/evl.cpp index 74a79fe25e..e3f44fc403 100644 --- a/src/jrd/evl.cpp +++ b/src/jrd/evl.cpp @@ -3286,19 +3286,17 @@ static dsc* concatenate(thread_db* tdbb, jrd_nod* node, impure_value* impure) UCHAR* p = impure->vlu_desc.dsc_address; if (length1) { - do { - *p++ = *address1++; - } while (--length1); + memcpy(p, address1, length1); + p += length1; } if (length2) { - do { - *p++ = *address2++; - } while (--length2); + memcpy(p, address2, length2); } - if (temp3) + if (temp3) { delete temp3; + } } return &impure->vlu_desc; } diff --git a/src/jrd/idx.cpp b/src/jrd/idx.cpp index d5173d38e2..93abf73d4a 100644 --- a/src/jrd/idx.cpp +++ b/src/jrd/idx.cpp @@ -399,9 +399,9 @@ void IDX_create_index( if (l > 0) { const UCHAR* q = key.key_data; - do { - *p++ = *q++; - } while (--l); + memcpy(p, q, l); + p += l; + q += l; } if ( (l = key_length - key.key_length) ) { do {