1706b9a6ec
then checking that against ULONG_MAX. Instead use a "unsigned long" as the temporary variable. Then check against UINT32_MAX before assigning back to the original variable.