Summary: | app-forensics/foremost fails to compile with format-security | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Mike Auty (RETIRED) <ikelos> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | forensics+obsolete |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 259417 | ||
Attachments: | foremost-1.5.7-r1:20140825-233636.log |
Description
Agostino Sarubbo
![]() Created attachment 383676 [details]
foremost-1.5.7-r1:20140825-233636.log
build log
Firstly, both CFLAGS="-Werror=format-security" emerge -1av foremost CFLAGS="-D_FORTIFY_SOURCE=2" emerge -1av foremost compiled without issue. To force the error, I had to use: CFLAGS="-Wformat -Werror=format-security" emerge -1av foremost so it might be worth updating the automated text and/or the blocked bug. Investigating the code, it really doesn't look like there's any problem (the user input is converted to numbers earlier, stored in a format string that is based off a constant) however at the same time, there's little point in what they were doing either (using sprintf to copy from one string to another only to use the new string once and then neither of the strings ever again). I've put a patch into the tree which we can lug around if this is considered a big enough issue, but I'm not a professional C programmer, and I couldn't say what impact the patch will have on the security or normal operation of the program, only that it eliminates this warning. |