Copy memory blocks of different sizes

Is there a better way than this to copy the values from source to destination when the blocks of memory you want to copy to and from are different sizes? Also considering you have no control over making sure the sizes match to begin with.

while (count--) {
memcpy(dst, src, dst_stride);
src += src_stride;
dst += dst_stride;
}

• This seems more of a StackOverflow kind of question. Perhaps migrating it to that site would result in more feedback than in here... – glampert Mar 6 '15 at 17:54

if(src_stride == dst_stride){