Summary: | media-sound/subtract_wave _FORTIFY_SOURCE indicates presence of overflow | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Diego Elio Pettenò (RETIRED) <flameeyes> |
Component: | Current packages | Assignee: | Gentoo Sound Team <sound> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | hardened |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 259417 | ||
Attachments: |
Build log
Patch to substract_wave-0.3.ebuild to use sed to convert offending strcpy into memcpy |
Description
Diego Elio Pettenò (RETIRED)
![]() Created attachment 247425 [details]
Build log
Created attachment 247543 [details, diff]
Patch to substract_wave-0.3.ebuild to use sed to convert offending strcpy into memcpy
Upstream uses strcpy to fill in structure fields that are not meant to be null terminated. Fortunately, strcpy is used in only five places in the file. Four of them need to be changed, and one of them uses a variable string (and is a poor reimplementation of strdup, but that is not relevant here). This sed expression matches the four offending strcpy that copy constant strings and converts them into a memcpy that uses the sizeof the destination as its copy-count. At present, all such sizes are equal to 4 (see $S/wave_header.h), and all input strings are four characters.
|