arnodel / golua

A Lua compiler / runtime in Go
Apache License 2.0
86 stars 10 forks source link

Check for bounds in utf8.len #70

Closed arnodel closed 2 years ago

arnodel commented 2 years ago

in utf8.len, there is a bug that causes a panic if the optional offset arguments are out of range.

This PR fixes it.

codecov[bot] commented 2 years ago

Codecov Report

Merging #70 (5399e29) into master (ec87bd8) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #70   +/-   ##
=======================================
  Coverage   86.21%   86.21%           
=======================================
  Files          90       90           
  Lines        9822     9825    +3     
=======================================
+ Hits         8468     8471    +3     
  Misses       1067     1067           
  Partials      287      287           
Impacted Files Coverage Δ
lib/utf8lib/utf8lib.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ec87bd8...5399e29. Read the comment docs.