Redefined EXIT_FAILURE macro in /java.security.jgss/windows/native/libw2k_lsa_auth/NativeCreds.c

Julian Waters tanksherman27 at gmail.com
Fri Jun 10 07:01:30 UTC 2022


In NativeCreds.c there seems to be a redefined macro for EXIT_FAILURE (line
51)

#undef LSA_SUCCESS
#define LSA_SUCCESS(Status) ((Status) >= 0)
#define EXIT_FAILURE -1 // mdu <-----

As far as I can see, it's a redundant definition not used anywhere other
than in a call to ExitProcess that's been commented out on line 826:

if (0 == dwRes) {
    printf("LSA: FormatMessage failed with %d\n", GetLastError());
    // ExitProcess(EXIT_FAILURE);
}

This definition is also not correct, since EXIT_FAILURE on Windows is
defined as 1, not -1. Would it be safe to remove this unused macro
definition?

best regards,
Julian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/security-dev/attachments/20220610/457d7ff4/attachment.htm>


More information about the security-dev mailing list