From: Alan T. DeKok Date: Wed, 20 May 2015 17:51:50 +0000 (-0400) Subject: Use strlcpy for strings, not memcpy X-Git-Tag: release_3_0_9~331 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a839bae07368948b8805231a8369102e44e26d9;p=thirdparty%2Ffreeradius-server.git Use strlcpy for strings, not memcpy --- diff --git a/src/modules/rlm_python/rlm_python.c b/src/modules/rlm_python/rlm_python.c index 43b51b412c0..3f52b87165f 100644 --- a/src/modules/rlm_python/rlm_python.c +++ b/src/modules/rlm_python/rlm_python.c @@ -223,9 +223,9 @@ static int mod_init(rlm_python_t *inst) inst->main_thread_state = PyThreadState_Get(); /* We need this for setting up thread local stuff */ #endif if (inst->python_path) { - char *path; + char path[4096]; - memcpy(&path, &inst->python_path, sizeof(path)); + strlcpy(path, inst->python_path, sizeof(path)); PySys_SetPath(path); }