diff --git a/src/core/plugin.c b/src/core/plugin.c
index 46976d01f7435c580e088f3aebd7836ad14ebbf4..559e6eb4d7db1aa803a55783025d2dc4a8ee6afb 100644 (file)
--- a/src/core/plugin.c
+++ b/src/core/plugin.c
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif /* HAVE_CONFIG_H */
+
#include "sysdb.h"
#include "core/plugin.h"
#include "core/time.h"
int
sdb_plugin_load(const char *name, const sdb_plugin_ctx_t *plugin_ctx)
{
- char real_name[strlen(name) > 0 ? strlen(name) : 1];
+ char real_name[name ? strlen(name) + 1 : 1];
const char *name_ptr;
char *tmp;