diff --git a/src/control/newtoolbar.c b/src/control/newtoolbar.c index a8e7015b..6c95600f 100644 --- a/src/control/newtoolbar.c +++ b/src/control/newtoolbar.c @@ -1433,10 +1433,12 @@ static LRESULT NewToolbarCtrlProc (HWND hwnd, UINT message, WPARAM wParam, LPARA item_info->add_data = item->add_data; if (item_info->which & MTB_WHICH_TEXT) - strncpy (item_info->text, item->text, NTB_TEXT_LEN); + //strncpy (item_info->text, item->text, NTB_TEXT_LEN); + strcpy (item_info->text, item->text); if (item_info->which & MTB_WHICH_TIP) - strncpy (item_info->tip, item->tip, NTB_TIP_LEN); + //strncpy (item_info->tip, item->tip, NTB_TIP_LEN); + strcpy (item_info->tip, item->tip); return NTB_OKAY; } diff --git a/src/font/devfont.c b/src/font/devfont.c index 0bb09a3c..45fcaae4 100644 --- a/src/font/devfont.c +++ b/src/font/devfont.c @@ -1012,8 +1012,9 @@ void GUIAPI DestroyDynamicDevFont (DEVFONT** devfont) { char font_name [LEN_UNIDEVFONT_NAME + 1]; - memset(font_name, 0, LEN_UNIDEVFONT_NAME + 1); - strncpy(font_name, (*devfont)->name, LEN_UNIDEVFONT_NAME); + //memset(font_name, 0, LEN_UNIDEVFONT_NAME + 1); + //strncpy(font_name, (*devfont)->name, LEN_UNIDEVFONT_NAME); + strcpy(font_name, (*devfont)->name); font_DelDevFont (font_name); *devfont = NULL; diff --git a/src/ial/linux-libinput.c b/src/ial/linux-libinput.c index 3e11604b..de8a3b67 100644 --- a/src/ial/linux-libinput.c +++ b/src/ial/linux-libinput.c @@ -1243,11 +1243,9 @@ static int wait_event_ex (int maxfd, fd_set *in, fd_set *out, fd_set *except, break; } -#if 0 default: - _DBG_PRINTF("IAL>LIBINPUT: got a UNKNOWN event type: %d\n", type); + _WRN_PRINTF("IAL>LIBINPUT: got a UNKNOWN event type: %d\n", type); break; -#endif } libinput_event_destroy(event); diff --git a/src/kernel/init-lite.c b/src/kernel/init-lite.c index 5a0aa698..e43f6da7 100644 --- a/src/kernel/init-lite.c +++ b/src/kernel/init-lite.c @@ -478,8 +478,10 @@ int InitGUI (int argc, const char* agr[]) /* Since 5.0.0 * Copy the video engine information to the shared resource segement */ - strncpy (SHAREDRES_VIDEO_ENGINE, engine, LEN_ENGINE_NAME); - strncpy (SHAREDRES_VIDEO_MODE, mode, LEN_VIDEO_MODE); + //strncpy (SHAREDRES_VIDEO_ENGINE, engine, LEN_ENGINE_NAME); + strcpy (SHAREDRES_VIDEO_ENGINE, engine); + //strncpy (SHAREDRES_VIDEO_MODE, mode, LEN_VIDEO_MODE); + strcpy (SHAREDRES_VIDEO_MODE, mode); #if 0 /* deprecated code */ // these fileds will be initialized by DRM engine. if (GetMgEtcValue (engine, "device", diff --git a/src/misc/misc.c b/src/misc/misc.c index be79ab62..afa15fc6 100644 --- a/src/misc/misc.c +++ b/src/misc/misc.c @@ -1433,7 +1433,9 @@ char * strtrimall( char *src) return src; } - strcpy (src, src + nIndex1); + // VW: use memmove instead of strcpy to avoid overlapping + // strcpy (src, src + nIndex1); + memmove (src, src + nIndex1, nLen - nIndex1 + 1); nLen = strlen (src); nIndex1 = nLen - 1; diff --git a/src/server/request.c b/src/server/request.c index 3aa2f7bd..04b53c96 100644 --- a/src/server/request.c +++ b/src/server/request.c @@ -812,10 +812,10 @@ static int get_shared_surface (int cli, int clifd, void* buff, size_t len) static int authenticate_client (int cli, int clifd, void* buff, size_t len) { - uint32_t magic; int auth_result = 1; #ifdef _MGGAL_DRM + uint32_t magic; extern int __drm_auth_client(int, uint32_t); magic = *(uint32_t*)buff; auth_result = __drm_auth_client (cli, magic);