looks good.
-phil.
On 11/20/2015 03:20 PM, Pete Brunet wrote:
Thanks for looking at this Phil. How's this:
http://cr.openjdk.java.net/~ptbrunet/JDK-8056925/webrev.01/
Pete
On 11/20/15 3:07 PM, Phil Race wrote:
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.