Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Don't use temporary buffers when parsing PID maps in pmparser #202

Merged
merged 1 commit into from
Mar 24, 2021
Merged

Don't use temporary buffers when parsing PID maps in pmparser #202

merged 1 commit into from
Mar 24, 2021

Conversation

kerneltoast
Copy link
Contributor

FORTIFY_SOURCE is upset that the source buffer sizes for the strcpys in
pmparser_parse() are larger than the destination buffers. Using the
destination buffer directly fixes runtime crashes like these:
03-24 10:53:16.802 2758 2758 F libc : FORTIFY: strcpy: prevented 8-byte write into 5-byte buffer
03-24 10:53:16.802 2758 2758 F libc : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 2758 (main), pid 2758 (main)

FORTIFY_SOURCE is upset that the source buffer sizes for the strcpys in
pmparser_parse() are larger than the destination buffers. Using the
destination buffer directly fixes runtime crashes like these:
03-24 10:53:16.802  2758  2758 F libc    : FORTIFY: strcpy: prevented 8-byte write into 5-byte buffer
03-24 10:53:16.802  2758  2758 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 2758 (main), pid 2758 (main)
@RikkaW RikkaW merged commit 122a842 into RikkaApps:master Mar 24, 2021
RikkaW added a commit to RikkaApps/Shizuku that referenced this pull request Mar 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants