Hi,

On Jan 12, 2023, 14:34 +0800, Zhang Mingli <zmlpostg...@gmail.com>, wrote:
> Hi, hackers
>
> Some conditions in shm_toc_insert and shm_toc_allocate are bogus, like:
>               if (toc_bytes + nbytes > total_bytes || toc_bytes + nbytes < 
> toc_bytes)
> Remove the condition `toc_bytes + nbytes < toc_bytes` and take a 
> sizeof(shm_entry) into account in shm_toc_allocate though
> shm_toc_allocate does that too.
  shm_toc_insert does that too, and  we can report error earlier.

Regards,
Zhang Mingli

Reply via email to