Returns nonzero if the two size_ts can be multiplied without wrapping, or 0 * if the result would wrap. b must not be 0 (we don't even check here since * everything we pass in will have been checked before). */
| 73 | * everything we pass in will have been checked before). |
| 74 | */ |
| 75 | static int CanMultiply(size_t a, size_t b) |
| 76 | { |
| 77 | return a <= SIZE_MAX / b; |
| 78 | } |
| 79 | |
| 80 | /* Returns nonzero if the uint32_t can be converted to a size_t without losing |
| 81 | * data, which is always the case on 32-bit systems and higher, or 0 if such a |
no outgoing calls
no test coverage detected