[fixup] sam_and_substrings2 the sum can overflow, :(.