X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_getopt.c;h=7d157a0ee41bd0efe5760b7a8fc4d0e1ea8723fc;hp=5f938f398b691366fd2165c68d4e1b65c18297f4;hb=HEAD;hpb=28a2150521548582386dcadda9e25f8124cb0e9a diff --git a/src/rrd_getopt.c b/src/rrd_getopt.c index 5f938f3..7d157a0 100644 --- a/src/rrd_getopt.c +++ b/src/rrd_getopt.c @@ -39,10 +39,11 @@ #endif #endif - +#ifndef WIN32 #ifdef HAVE_CONFIG_H #include "../rrd_config.h" #endif +#endif #include "rrd_i18n.h" @@ -395,7 +396,7 @@ static const char* _getopt_initialize(int argc, considered as options. */ char var[100]; - sprintf(var, "_%d_GNU_nonoption_argv_flags_", getpid()); + snprintf(var, sizeof var, "_%d_GNU_nonoption_argv_flags_", getpid()); nonoption_flags = getenv(var); if (nonoption_flags == NULL) nonoption_flags_len = 0;