loader: scan_buffer can leave empty string on stack
When file is processed, we can (and will) get string with lenght 0 on stack, that will result in attempt to allocate 0 bytes.
Testing done: when malloc(0) will return NULL, we will hit this issue, tested by install+boot we do not get bitten by the issue. Also fixed in FreeBSD.
Updated by Electric Monk about 4 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
commit e141bae1eadd4373d692c722ab88dff7d998a3b8 Author: Toomas Soome <email@example.com> Date: 2019-09-17T20:11:21.000Z 11696 loader: scan_buffer can leave empty string on stack Reviewed by: Rob Johnston <firstname.lastname@example.org> Reviewed by: Andy Fiddaman <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>