[automerger skipped] spdif: fix possible buffer overflow am: 1b72d76412 am: 86ca73cbd3 -s ours am: 32b99befb3 -s ours am: d7c086743a -s ours

am skip reason: Change-Id Ifc7f8c8946388e19f39f35d649a5936568f8b9b2 with SHA-1 762fbb3e09 is in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/media/+/12638670

Change-Id: Ic9ad85d82f77fe7fee152fa6dcdf142c5b35f7d3