Skip to content

snprintf family of functions marked deprecated mustfix without a viable replacement #226

Description

The snprintf family of functions has no appropriate replacements and should not be marked deprecated mustfix. In particular, snprintf can be used in the absence of a buffer (represented by a null buffer of zero length) to determine the required buffer size. NTStrSafe replacements such as RtlStringCbPrintf simply are not designed to return the required buffer size in any way, while the snprintf_s family consider a null buffer of zero length a programming error that results in the invocation of the invalid argument handler.

The fix would be trivial: implement the _scprintf family of functions in the WDK.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions