Page MenuHome GnuPG

fix undefined-shift in block_filter
AcceptedPublic

Authored by ltx on Jun 12 2020, 5:18 AM.

Details

Summary

force to 'size_t' before shift

* common/iobuf.c (block_filter): add size_t.
  • Signed-off-by: lutianxiong <lutianxiong@huawei.com>
Test Plan
  1. make check
  2. run oss-fuzz

Diff Detail

Repository
rG GnuPG
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ltx edited the test plan for this revision. (Show Details)
ltx edited the summary of this revision. (Show Details)
ltx edited the test plan for this revision. (Show Details)

Thanks for the patch.
I see your point in T4975: undefined-shift in block_filter.
You are right that we have a problem of possible overflow (which could be kicked by fuzzing) here.
(The actual impact would be small, though).

This revision is now accepted and ready to land.Dec 7 2020, 4:07 AM