gin icon indicating copy to clipboard operation
gin copied to clipboard

Prevent slice out of bounds access before panic

Open fivemoreminix opened this issue 1 year ago • 0 comments

Previously, when the error would be triggered, it was possible that a slice out of bounds panic would occur before the intended panic message. I've added a nil/slice length check to make sure that does not happen.

With that said, I am not very familiar with the library so I cannot determine what this catch was supposed to mean, or convey, to users of the library. It would be helpful to know what I can do to make the error message more useful.

Thanks.

Fixes #3126

fivemoreminix avatar Jun 10 '22 02:06 fivemoreminix