fix buffer overflow in cioloop
Merge branch 'devel-0.5' into devel-0.6