diff --git a/openvpn_config.c b/openvpn_config.c index f744468..95e1d1f 100644 --- a/openvpn_config.c +++ b/openvpn_config.c @@ -211,7 +211,7 @@ ConfigFileOptionExist(int config, const char *option) while (fgets(line, sizeof(line), fp)) { - if (strncmp(line, option, sizeof(option)) == 0) + if (strncmp(line, option, strlen(option)) == 0) { fclose(fp); return true;