< prev index next >
src/java.desktop/unix/native/libawt_xawt/awt/awt_InputMethod.c
Print this page
rev 16201 : 8170525: Fix minor issues in AWT/ECC/PKCS11 coding
Reviewed-by: vinnie, clanger, prr, ssadetsky
*** 1,7 ****
/*
! * Copyright (c) 1997, 2015, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1997, 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 1233,1248 ****
currentX11InputMethodInstance = (jobject)client_data;
if (status_draw->type == XIMTextType){
XIMText *text = (status_draw->data).text;
if (text != NULL){
! if (text->string.multi_byte != NULL){
! strcpy(statusWindow->status, text->string.multi_byte);
}
! else{
char *mbstr = wcstombsdmp(text->string.wide_char, text->length);
! strcpy(statusWindow->status, mbstr);
}
statusWindow->on = True;
onoffStatusWindow(pX11IMData, statusWindow->parent, True);
paintStatusWindow(statusWindow);
}
--- 1233,1250 ----
currentX11InputMethodInstance = (jobject)client_data;
if (status_draw->type == XIMTextType){
XIMText *text = (status_draw->data).text;
if (text != NULL){
! if (text->string.multi_byte != NULL) {
! strncpy(statusWindow->status, text->string.multi_byte, MAX_STATUS_LEN);
! statusWindow->status[MAX_STATUS_LEN - 1] = '\0';
}
! else {
char *mbstr = wcstombsdmp(text->string.wide_char, text->length);
! strncpy(statusWindow->status, mbstr, MAX_STATUS_LEN);
! statusWindow->status[MAX_STATUS_LEN - 1] = '\0';
}
statusWindow->on = True;
onoffStatusWindow(pX11IMData, statusWindow->parent, True);
paintStatusWindow(statusWindow);
}
< prev index next >