[9] RFR 8011983: False positive: unportable format string argument mismatch in jdk/src/windows/native/com/sun/security/auth/module/nt.c

Vincent Ryan vincent.x.ryan at oracle.com
Wed Feb 5 15:00:36 UTC 2014


Hello,

I’d like to make the following trivial fix to a JAAS function in native code on Windows.
It simply corrects a printf statement to expect a pointer: 

diff --git a/src/windows/native/com/sun/security/auth/module/nt.c b/src/windows/native/com/sun/security/auth/module/nt.c
--- a/src/windows/native/com/sun/security/auth/module/nt.c
+++ b/src/windows/native/com/sun/security/auth/module/nt.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -589,7 +589,8 @@ BOOL getImpersonationToken(PHANDLE imper
     CloseHandle(dupToken);
 
     if (debug) {
-        printf("  [getImpersonationToken] token = %d\n", *impersonationToken);
+        printf("  [getImpersonationToken] token = %p\n",
+            (void *)*impersonationToken);
     }
     return TRUE;
 }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20140205/8ad3aa93/attachment.htm>


More information about the security-dev mailing list