mirror of
https://github.com/libretro/RetroArch
synced 2025-03-05 19:13:45 +00:00
Replace more usage of strcpy
This commit is contained in:
parent
077fb3d32d
commit
43da185d5d
@ -158,7 +158,7 @@ static INLINE void rarch_fail(int error_code, const char *error)
|
||||
* just exit right away. */
|
||||
rarch_assert(global->inited.error);
|
||||
|
||||
strcpy(global->error_string, error);
|
||||
strlcpy(global->error_string, error, sizeof(global->error_string));
|
||||
longjmp(global->error_sjlj_context, error_code);
|
||||
}
|
||||
|
||||
|
@ -18,9 +18,13 @@
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include <Cg/cg.h>
|
||||
#include <Cg/cgD3D9.h>
|
||||
|
||||
#include <retro_inline.h>
|
||||
#include <compat/strl.h>
|
||||
|
||||
#include "render_chain_driver.h"
|
||||
#include "../video_driver.h"
|
||||
#include "../../general.h"
|
||||
@ -1166,7 +1170,7 @@ static bool cg_d3d9_renderchain_add_lut(void *data,
|
||||
|
||||
info.tex = lut;
|
||||
info.smooth = smooth;
|
||||
strcpy(info.id, id);
|
||||
strlcpy(info.id, id, sizeof(info.id));
|
||||
if (!lut)
|
||||
return false;
|
||||
|
||||
|
@ -175,7 +175,7 @@ struct http_connection_t *net_http_connection_new(const char *url)
|
||||
if (!conn->urlcopy)
|
||||
goto error;
|
||||
|
||||
strcpy(conn->urlcopy, url);
|
||||
strlcpy(conn->urlcopy, url, sizeof(conn->urlcopy));
|
||||
|
||||
if (strncmp(url, "http://", strlen("http://")) != 0)
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user