http://bugs.winehq.org/show_bug.cgi?id=18053
Summary: Unsafe function warnings on OpenBSD Product: Wine Version: 1.1.19 Platform: PC OS/Version: OpenBSD Status: NEW Keywords: download, source Severity: enhancement Priority: P2 Component: build-env AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Created an attachment (id=20449) --> (http://bugs.winehq.org/attachment.cgi?id=20449) make log
: warning: strcpy() is almost always misused, please use strlcpy() : warning: strcat() is almost always misused, please use strlcat() : warning: sprintf() is often misused, please use snprintf()
42 warnings total. It's not showing it for every use, so these probably are worth checking.
Make log attached.
http://bugs.winehq.org/show_bug.cgi?id=18053
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2009-04-15 00:51:09 --- This bug is of same magnitude as the bug 14788 is. If the compiler developers assume that all compiler users are idiots throw that at /dev/nul. On the other hand if that warnings are enabled by default that's a bug in the user space headers and should be reported appropriately.
http://bugs.winehq.org/show_bug.cgi?id=18053
--- Comment #2 from Vitaliy Margolen vitaliy@kievinfo.com 2009-04-15 01:25:56 --- Not even saying that strlcpy() and strlcat() are not portable.
http://bugs.winehq.org/show_bug.cgi?id=18053
--- Comment #3 from Austin English austinenglish@gmail.com 2009-04-15 11:45:19 --- (In reply to comment #1)
This bug is of same magnitude as the bug 14788 is. If the compiler developers assume that all compiler users are idiots throw that at /dev/nul. On the other hand if that warnings are enabled by default that's a bug in the user space headers and should be reported appropriately.
Those functions are used all throughout Wine without warning. Only 42 of them are causing a warning, and if anything, should be investigated.
If you feel otherwise, feel free to mark invalid. I wanted to make sure the issue was at least known.
http://bugs.winehq.org/show_bug.cgi?id=18053
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID
--- Comment #4 from Dmitry Timoshkov dmitry@codeweavers.com 2009-04-16 00:54:59 ---
: warning: strcpy() is almost always misused, please use strlcpy() : warning: strcat() is almost always misused, please use strlcat() : warning: sprintf() is often misused, please use snprintf()
The complier messages above are at least misleading ("almost always", that's at least a funny statement), and expect a "cover everything" action. That's not the policy for Wine bugs when each case should be investigated and treat separately.
http://bugs.winehq.org/show_bug.cgi?id=18053
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Dmitry Timoshkov dmitry@codeweavers.com 2009-04-16 00:55:19 --- Closing.