Yes, the return value of get_index_dynamic() must be signed because it returns -1 for a non-existing element. So the effective limit for dynamic array is LONG_MAX elements *if* get_index_dynamic() is used. I didn't want to change the interface to make the patch less intrusive. And it is enough for our purposes because:
- the value used to initialize it in sort.c is signed anyway
- get_index_dynamic() is not used in sort.c
Yes, the return value of get_index_dynamic() must be signed because it returns -1 for a non-existing element. So the effective limit for dynamic array is LONG_MAX elements *if* get_index_dynamic() is used. I didn't want to change the interface to make the patch less intrusive. And it is enough for our purposes because:
- the value used to initialize it in sort.c is signed anyway
- get_index_dynamic() is not used in sort.c