[Bug 16336] advpack/tests/install: format not a string literal and no format arguments

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Dec 4 20:36:44 CST 2008


http://bugs.winehq.org/show_bug.cgi?id=16336





--- Comment #3 from Vitaliy Margolen <vitaliy at kievinfo.com>  2008-12-04 20:36:44 ---
What's wrong with good 'ol strcpy and strcat?
That whole append_str() function should go and instead do something like:

    strcpy(data, "[Version]\n");
    strcat(data, "Signature=\"$Chicago$\"\n");
    strcat(data, "AdvancedINF=2.5\n");
    strcat(data, "[DefaultInstall]\n");
    strcat(data, "CheckAdminRights=1\n");

Or better yet make it a static const char:

    static const char data[] =
    "[Version]\n"
    "Signature=\"$Chicago$\"\n"
    "AdvancedINF=2.5\n"
    "[DefaultInstall]\n"
    "CheckAdminRights=1\n";
..
    WriteFile(hf, data, sizeof(data) - 1, &dwNumberOfBytesWritten, NULL);


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list