>In general, it's not possible to split a page without it being >initialized, and having at least 2 items (not including the incoming >newitem). Besides, even if "maxoff" had an integer underflow the >behavior of the function would still be sane and defined. OffsetNumber >is an unsigned type. Well, I didn't mean that it's failing..I meant it could fail.. If PageGetMaxOffsetNumber, can return zero, maxoff can be zero. (0 - 1), on unsigned type, certainly is underflow and if maxoff can be one, (1 - 1) is zero, and state->newitemsz * (maxoff - 1), is zero.
>Where are you getting this stuff from? Are you using a static analysis tool? Yes,two static tools, but reviewed by me. Best regards. Ranier Vilela -- Peter Geoghegan