Variable sizeNames
is an array of pointers, not a string (array of characters) that you need to terminate with a null-character.
So remove this:
*(sizeNames + idx) = 0;
And change this:
for (i=0; *(sizeNames+i); i++)
To this:
for (i=0; i<size; i++)