Change #262845
| Category | libpcap |
| Changed by | Denis Ovsienko <denis@ovsienko.info> |
| Changed at | Sun 29 Mar 2026 14:42:19 |
| Repository | https://git.tcpdump.org/libpcap |
| Project | libpcap |
| Branch | master |
| Revision | 726d5040e216227a82da76e6e84177eaae286a08 |
Comments
Make other chunk allocation improvements. Make the chunk size an unary macro rather than a variable. Make chunk index unsigned. Introduce a helper function with additional validation and a more useful error message to initialise the current chunk. Use the latter in initchunks() to start the data allocations in chunk 0 rather than chunk 1. In newchunk_nolongjmp(), if the requested data size is too big for both the current chunk and the next chunk, there is no point in having the side effect of initialising the next chunk, so in this case just return an error early. Ibid., lose the pointer to the current chunk because using two ways to acess the same data creates a space for an error. Ibid., use the new helper function and make another error message more useful.
Changed files
- gencode.c