[PATCH] dm: fix copying after src array boundaries