ERROR: AddressSanitizer: heap-buffer-overflow

I receive following error:
Screenshot 2022-05-16 at 6.48.20 PM

I mostly understood what it tells me. The error seems to occur by trying to access an address out of the allocated memory of the pixels array. I am mostly confused by the text in green. It seems that I try to access the exact byte right after the 27 byte region that describes a 3x3 pixel array (9 pixels á 3 bytes representing RGB). So might I just be off by one?

Thanks in advance!