SDL_video.c: replace strlcpy with memcpy in SDL_ShowMessageBox()
This commit is contained in:
@@ -5476,7 +5476,7 @@ bool SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonID)
|
|||||||
if (!titlecpy) {
|
if (!titlecpy) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SDL_strlcpy(titlecpy, messageboxdata->title, slen);
|
SDL_memcpy(titlecpy, messageboxdata->title, slen);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (messageboxdata->message) {
|
if (messageboxdata->message) {
|
||||||
@@ -5486,7 +5486,7 @@ bool SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonID)
|
|||||||
SDL_small_free(titlecpy, titleisstack);
|
SDL_small_free(titlecpy, titleisstack);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
SDL_strlcpy(msgcpy, messageboxdata->message, slen);
|
SDL_memcpy(msgcpy, messageboxdata->message, slen);
|
||||||
}
|
}
|
||||||
|
|
||||||
(void)SDL_AtomicIncRef(&SDL_messagebox_count);
|
(void)SDL_AtomicIncRef(&SDL_messagebox_count);
|
||||||
|
|||||||
Reference in New Issue
Block a user