On 11/20/2015 09:24 AM, Pete Brunet wrote:
Please review:
http://cr.openjdk.java.net/~ptbrunet/JDK-8056925/webrev.00/

  42 char *printError(char *msg) {
  43     LPVOID lpMsgBuf = NULL;
  44     static char retbuf[256];
  45
  46     if (msg != NULL) {
  47         strncpy((char *)retbuf, msg, sizeof(retbuf));
  48     }

If msg length >=256 chars you will not get a null terminated string.
I don't see that happening anywhere but defensive coding is best.

-phil.


Reply via email to