From: Kern Sibbald Date: Sat, 20 Aug 2011 12:47:11 +0000 (+0200) Subject: Fix possible buffer overrun in exchange plugin X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=16a52bc07c971b5caead55a2a760d73b0d065141;p=bacula%2Fbacula Fix possible buffer overrun in exchange plugin --- diff --git a/bacula/src/win32/filed/plugins/exchange-fd.c b/bacula/src/win32/filed/plugins/exchange-fd.c index 22222702b0..8e654fb837 100644 --- a/bacula/src/win32/filed/plugins/exchange-fd.c +++ b/bacula/src/win32/filed/plugins/exchange-fd.c @@ -312,7 +312,7 @@ static bRC handlePluginEvent(bpContext *ctx, bEvent *event, void *value) } { _DebugMessage(0, "backup command=%s\n", (char *)value); - char *command = new char[strlen((char *)value)]; + char *command = new char[strlen((char *)value) + 1]; strcpy(command, (char *)value); char *plugin_name = strtok((char *)command, ":"); char *path = strtok(NULL, ":");