<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Thanks Kelly for being patient about sprintf()!<br>
<br>
And thanks for the quick review! (forgot to say that earlier)<br>
<br>
Dan<br>
<br>
</tt><br>
On 3/17/2011 6:38 PM, Kelly O'Hair wrote:
<blockquote cite="mid:4D48F842-E1F7-400C-8C27-08533ADFDFB8@oracle.com"
 type="cite"><br>
  <div>
  <div>On Mar 17, 2011, at 1:34 PM, Daniel D. Daugherty wrote:</div>
  <br class="Apple-interchange-newline">
  <blockquote type="cite">
    <div bgcolor="#ffffff" text="#000000">On 3/17/2011 2:29 PM, Kelly
O'Hair wrote:
    <blockquote
 cite="mid:8D3BC900-0942-4C2A-9509-DF02ED57A8F3@oracle.com" type="cite">
      <pre wrap="">Dan,

It looks ok, but you are using sprintf, and it really should be snprintf.
On Windows you may need to:
   #define snprintf        _snprintf
  </pre>
    </blockquote>
    <tt><br>
Yup. I know we have to do that someday soon...<br>
    <br>
    <br>
    </tt>
    <blockquote
 cite="mid:8D3BC900-0942-4C2A-9509-DF02ED57A8F3@oracle.com" type="cite">
      <pre wrap="">---
We (myself included) all need to start being more careful about use of strcpy, strcat, sprintf, etc.
The static analysis tools are all starting to just flag the use of them as an error, so we need to start
getting rid of these calls from all our code eventually. Which may take some major time. :^(
  </pre>
    </blockquote>
    <tt><br>
I copied the code from elsewhere in src/windows/native/...<br>
just so I could do it like "everyone else"...<br>
    <br>
    <br>
    </tt>
    <blockquote
 cite="mid:8D3BC900-0942-4C2A-9509-DF02ED57A8F3@oracle.com" type="cite">
      <pre wrap="">Don't shoot the messenger. :^(
  </pre>
    </blockquote>
    <tt><br>
No plans to shoot you. Would it be OK if I pushed this fix as is?<br>
When I continue with 7020052 (the related bug), I'll come back to<br>
this file and switch to snprintf()... along with the rest of the<br>
fix...<br>
    <br>
    </tt></div>
  </blockquote>
  <div><br>
  </div>
Ok.</div>
  <div><br>
  </div>
  <div>-kto</div>
  <div><br>
  <blockquote type="cite">
    <div bgcolor="#ffffff" text="#000000"><tt>Dan<br>
    <br>
    <br>
    </tt>
    <blockquote
 cite="mid:8D3BC900-0942-4C2A-9509-DF02ED57A8F3@oracle.com" type="cite">
      <pre wrap="">-kto

On Mar 17, 2011, at 11:42 AM, Daniel D. Daugherty wrote:

  </pre>
      <blockquote type="cite">
        <pre wrap="">Greetings,

I have minor fixes to the Attach On Demand (AOD) Windows
specific code that I'd like to get into T&amp;L snapshot for
OpenJDK7-B136 (next week):

  <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://cr.openjdk.java.net/%7Edcubed/7028668-webrev/0/">http://cr.openjdk.java.net/~dcubed/7028668-webrev/0/</a>

I'm adding more info to the default detail message for an
OpenProcess() failure. I'm also getting a process handle
in a different way when a Java process tries to attach to
itself. If the new technique fails, then we fall back to
the original OpenProcess() code.

Thanks, in advance, for any comments.

Dan



    </pre>
      </blockquote>
      <pre wrap=""><!---->
  </pre>
    </blockquote>
    </div>
  </blockquote>
  </div>
  <br>
</blockquote>
</body>
</html>