Merge pull request #1148 from tom-daubney-arm/backport_hash_buffer_protection

[Backport] - Hash buffer protection