Assertion for size < 0 and negative array index values