removing improper array length calculation

This bug was found using a clang build. It is not possible to calculate the length of a C array by using sizeof, it will return the size of the pointer.