Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !2804

Ensure correct variadic arguments are passed to (_snw)(f)printf

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/vbaderks/iX-variadic_argument-1 into master Jan 16, 2018
  • Overview 4
  • Commits 1
  • Pipelines 0
  • Changes 3

Created by: vbaderks

_snwprintf requires the use of %s when passing a wchar* type as variadic argument. %S should be used for for char* arguments. note: for method _snprintf it is the other way around. Function file_exists can only handle a WCHAR * fn parameter (calls LAST_WCHAR at line 394) file_exists(const TCHAR fn) prototype changed to file_exists(const WCHAR fn) as TCHAR gives the impression that it can be a char or a wchar_t.

Printf format specifier %08x expects an unsigned int and not a pointer. Printf format specified %p expects a void pointer and not an unsigned int.

Note: alternative solution for %08x, would be to use %p as format specifier, which has the benefit of being more compatible with 64bit code.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/vbaderks/iX-variadic_argument-1