Re: [PATCH v2 2/4] media: venus: hfi_parser: avoid OOB access beyond payload word count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/12/2024 13:24, Vikash Garodia wrote:
If you see, words_count is doing the role of remaining_size. In existing
implementation as well, we can move those increments per case to once per loop,
just that to avoid incrementing for default case.

Yes.

To me it seems

- A redundant step to have words_count
- That the functions themselves should return the amount of bytes
  words += should increment by
- That you could do that words += outside of the switch instead of
  at each case:

but to be clear the logic of incrementing the words looks right to me now, I'm suggesting additional stylistic change.

---
bod




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux