FS#66828 - strcpy with realloc
Attached to Project:
Pacman
Opened by Sylwester Lunski (woodi) - Friday, 29 May 2020, 14:51 GMT
Last edited by Allan McRae (Allan) - Tuesday, 29 December 2020, 13:23 GMT
Opened by Sylwester Lunski (woodi) - Friday, 29 May 2020, 14:51 GMT
Last edited by Allan McRae (Allan) - Tuesday, 29 December 2020, 13:23 GMT
|
Details
Summary and Info:
Pacman source code: file src/pacman/util.c line 1241 and 1242: optstring = realloc(optstring, strlen(optstring) + strlen(status) + 1); strcpy(optstring + strlen(optstring), status); No realloc error checking. Also, using strcpy in pacman/libalpm is not very good sign. Steps to Reproduce: None yet but should "work" in low memory conditions. |
This task depends upon