GCC seems to complain about a possible signed to unsigned conversion in combination with allocation and copying here.