SAPT2 calculation stops with a Segmentation fault error

I have had a similar problem with segmentation faults during SAPT2+ jobs on large systems (268 electrons with aug-cc-pvdz basis). I think I identified and patched an integer overflow in the part of the code that computes the SAPT amplitudes, similar to the fixes described in this thread from last year. I can confirm that this patch fixes the segmentation fault for my job, but I haven’t tested it extensively. @loriab, would you be interested in having me try to push this to the psi4 master?