Skip to content

Commit

Permalink
fix: Rare arithmetic overflow crash in MPIHasher (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
einsteinx2 committed Jan 16, 2024
1 parent 9eaa0ea commit 65fad25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mParticle-Apple-SDK/Utils/MPIHasher.swift
Expand Up @@ -30,7 +30,7 @@ import Foundation

var hash: Int32 = 0
for byte in dataToHash {
hash = ((hash << 5) &- hash) + Int32(byte);
hash = ((hash << 5) &- hash) &+ Int32(byte);
}

return String(hash)
Expand Down

0 comments on commit 65fad25

Please sign in to comment.