bug fix of EC_copy
Merge pull request #762 from huili2/ec_ut_bugfix

bug fix of EC_copy, it fixes the memory issue  for decoder EC Unit Test which may lead crash.