You might follow up with a De Bruijn/cyclic pattern and can see the overflow happen by step1 and precisely locate it by what replaces the A's.
https://youtu.be/L2j90atBpRU?is=q6W_1eF4viMoKZEA
Didn't the Alpine Linux bug also use A's for the exploit to login as root?