]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix possible buffer overrun in exchange plugin
authorKern Sibbald <kern@sibbald.com>
Sat, 20 Aug 2011 12:47:11 +0000 (14:47 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:00 +0000 (14:50 +0200)
bacula/src/win32/filed/plugins/exchange-fd.c

index 22222702b0923314fb00b1db4e638a774a9b0bbd..8e654fb837694619e6112f5b5c8fbc00d4d974e1 100644 (file)
@@ -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, ":");