8005661: [parfait] Possible buffer overrun in jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c

8005695: [parfait] Format string argument mismatch in jdk/src/solaris/native/sun/xawt/XToolkit.c
8005752: [parfait] False positive function call mismatch at jdk/src/solaris/native/sun/xawt/XWindow.c

Reviewed-by: art, serb
This commit is contained in:
Petr Pchelko 2013-06-19 17:12:23 +04:00
parent f94d68550a
commit d792da6ac6
3 changed files with 18 additions and 15 deletions
jdk/src/solaris/native/sun

@ -1366,12 +1366,18 @@ Java_sun_awt_X11GraphicsConfig_pGetBounds(JNIEnv *env, jobject this, jint screen
mid = (*env)->GetMethodID(env, clazz, "<init>", "(IIII)V");
if (mid != NULL) {
if (usingXinerama) {
bounds = (*env)->NewObject(env, clazz, mid, fbrects[screen].x,
fbrects[screen].y,
fbrects[screen].width,
fbrects[screen].height);
}
else {
if (0 <= screen && screen < awt_numScreens) {
bounds = (*env)->NewObject(env, clazz, mid, fbrects[screen].x,
fbrects[screen].y,
fbrects[screen].width,
fbrects[screen].height);
} else {
jclass exceptionClass = (*env)->FindClass(env, "java/lang/IllegalArgumentException");
if (exceptionClass != NULL) {
(*env)->ThrowNew(env, exceptionClass, "Illegal screen index");
}
}
} else {
XWindowAttributes xwa;
memset(&xwa, 0, sizeof(xwa));

@ -447,7 +447,7 @@ setXICWindowFocus(XIC ic, Window w)
*/
#define INITIAL_LOOKUP_BUF_SIZE 512
Bool
Boolean
awt_x11inputmethod_lookupString(XKeyPressedEvent *event, KeySym *keysymp)
{
JNIEnv *env = GetJNIEnv();
@ -457,8 +457,8 @@ awt_x11inputmethod_lookupString(XKeyPressedEvent *event, KeySym *keysymp)
int mblen;
jstring javastr;
XIC ic;
Bool result = True;
static Bool composing = False;
Boolean result = True;
static Boolean composing = False;
/*
printf("lookupString: entering...\n");

@ -685,8 +685,7 @@ performPoll(JNIEnv *env, jlong nextTaskTime) {
if (result == 0) {
/* poll() timed out -- update timeout value */
update_poll_timeout(TIMEOUT_TIMEDOUT);
PRINT2("%s(): TIMEOUT_TIMEDOUT curPollTimeout = %d \n",
performPoll, curPollTimeout);
PRINT2("performPoll(): TIMEOUT_TIMEDOUT curPollTimeout = %d \n", curPollTimeout);
}
if (pollFds[1].revents) {
int count;
@ -695,14 +694,12 @@ performPoll(JNIEnv *env, jlong nextTaskTime) {
do {
count = read(AWT_READPIPE, read_buf, AWT_POLL_BUFSIZE );
} while (count == AWT_POLL_BUFSIZE );
PRINT2("%s(): data on the AWT pipe: curPollTimeout = %d \n",
performPoll, curPollTimeout);
PRINT2("performPoll(): data on the AWT pipe: curPollTimeout = %d \n", curPollTimeout);
}
if (pollFds[0].revents) {
// Events in X pipe
update_poll_timeout(TIMEOUT_EVENTS);
PRINT2("%s(): TIMEOUT_EVENTS curPollTimeout = %ld \n",
performPoll, curPollTimeout);
PRINT2("performPoll(): TIMEOUT_EVENTS curPollTimeout = %ld \n", curPollTimeout);
}
return;