TTimo Kreuzer[FTP] Fix invalid call to free()
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[PSEH] Use _setjmp3 with custom unwind function | 1 年前 | |
[FTP] Fix invalid call to free() While our glob is a dummy anyway and always returns NULL, the basic idea is that glob returns a NULL terminated array of pointers. The original code only calls blkfree to free any allocation in the array after the first one and doesn't free the array itself. Our code tried to be "smart" and free the array as well, but the array pointer was already changed by a "globbed++", resulting in trying to free an invalid address. Also the free was only called, when glob returned more than one result. This is now fixed by removing the "++", doing the blkfree on "&globbed[1]" and calling free on the originally returned array in all cases. Fixes GCC 13 warning: C:/ReactOS/reactos/base/applications/network/ftp/cmds.c: In function 'globulize': C:/ReactOS/reactos/base/applications/network/ftp/cmds.c:1684:25: error: 'free' called on pointer 'globbed' with nonzero offset 4 [-Werror=free-nonheap-object] 1684 | free((char *)globbed); | ^~~~~~~~~~~~~~~~~~~~~ C:/ReactOS/reactos/base/applications/network/ftp/cmds.c:1669:19: note: returned from 'glob' 1669 | globbed = glob(*cpp); | ^~~~~~~~~~ In our port glob is a dummy that always returns NULL, and the original code does not have a free here, either. | 6 个月前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 | |
[FTP] lostpeer() is declared and defined with a void return type. #179 | 8 年前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 | |
[FTP] Don't hardcode C: drive (#2767) CORE-13235 | 6 年前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 | |
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. | 8 年前 |