From 5146f22bc5fe0880e0dd6f59c328fc72e146080d Mon Sep 17 00:00:00 2001 From: Miller Puckette <msp@ucsd.edu> Date: Wed, 12 Dec 2007 20:11:18 -0800 Subject: [PATCH] update version number and add string overflow prot --- src/m_pd.h | 2 +- src/s_main.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/m_pd.h b/src/m_pd.h index 3e9f49e5a..2a9a1dafe 100644 --- a/src/m_pd.h +++ b/src/m_pd.h @@ -11,7 +11,7 @@ extern "C" { #define PD_MAJOR_VERSION 0 #define PD_MINOR_VERSION 41 #define PD_BUGFIX_VERSION 0 -#define PD_TEST_VERSION "test08" +#define PD_TEST_VERSION "test09" /* old name for "MSW" flag -- we have to take it for the sake of many old "nmakefiles" for externs, which will define NT and not MSW */ diff --git a/src/s_main.c b/src/s_main.c index 362b5ce18..002866d51 100644 --- a/src/s_main.c +++ b/src/s_main.c @@ -822,14 +822,16 @@ int sys_argparse(int argc, char **argv) else if (!strcmp(*argv, "-schedlib")) { sys_externalschedlib = 1; - strcpy(sys_externalschedlibname, argv[1]); + strncpy(sys_externalschedlibname, argv[1], + sizeof(sys_externalschedlibname) - 1); argv += 2; argc -= 2; } else if (!strcmp(*argv, "-extraflags")) { sys_extraflags = 1; - strcpy(sys_extraflagsstring, argv[1]); + strncpy(sys_extraflagsstring, argv[1], + sizeof(sys_extraflagsstring) - 1); argv += 2; argc -= 2; } -- GitLab