Repository navigation
Jpeg HuffmanTable improvements - #1926
Conversation
|
Gotcha One of the invalid test images was going out of bounds during new |
|
Ah nice, well done finding that. So now I guess we have to find a way to sanitise cheaply and then try to move the table building to the constructor. |
|
It's actually a bug, there's a possibility for malformed image go out of bounds without any exceptions in current master. I found a way to check that without a noticable slowdown. I'd also create an example image for a test suite. |
Codecov Report
@@ Coverage Diff @@
## master #1926 +/- ##
======================================
- Coverage 88% 88% -1%
======================================
Files 966 966
Lines 51350 51320 -30
Branches 6401 6397 -4
======================================
- Hits 45218 45188 -30
Misses 5074 5074
Partials 1058 1058
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
High hopes it would pass all the tests, it is ready to be reviewed:
There's no need for a new test image, image from #839 has malformed DHT marker which goes out-of-bounds during huffman table for unsafe pointers (which is unspottable without wrapping them with this is my favourite |
JimBobSquarePants
left a comment
There was a problem hiding this comment.
Faster... Fantastic 🤣
This is very, very good as always. Thanks! 👍
Prerequisites
Description
This PR removes redundant
Configure()calls forHuffmanTableand removes stack pressure fromstackalloccalls.TODO
Configure()methodstackalloccalls