]> git.ipfire.org Git - thirdparty/tor.git/commit
Fix a bug with less optimized polyval variants.
authorNick Mathewson <nickm@torproject.org>
Thu, 22 May 2025 13:54:09 +0000 (09:54 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 22 May 2025 13:54:09 +0000 (09:54 -0400)
commit7adb60c1c700abb2e1b69943737a17bfbb63a30b
treef143c69c8c35cb876e16a914d6f0d733f1a9b01f
parente95181096ff485a63f7714a1158467b8a3a8316e
Fix a bug with less optimized polyval variants.

Using "0" to mean "doesn't support multi-block processing"
ran us into trouble: (n > 0 * 16) is always true for n > 0,
so we were always running a loop with no termination condition.

Additionally, the >s in this block should have been >=s,
since we want to process multi-blocks as long as there are any.
This won't have a performance impact for our current input sizes,
but it's nice to be correct.
src/ext/polyval/polyval.c