]> git.sur5r.net Git - bacula/bacula/commitdiff
Check pool memory size for truncate op
authorEric Bollengier <eric@eb.homelinux.org>
Wed, 27 Jan 2010 08:29:40 +0000 (09:29 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Wed, 27 Jan 2010 08:30:05 +0000 (09:30 +0100)
bacula/src/stored/dircmd.c

index 400647da13eeffa314b86e41f46edccdad314a0c..fcb8c38d1846154586503959bfb4b7f3213b98eb 100644 (file)
@@ -890,6 +890,9 @@ static bool action_on_purge_cmd(JCR *jcr)
    DCR *dcr;
    int action;
 
+   devname.check_size(dir->msglen+1);
+   volumename.check_size(dir->msglen+1);
+
    if (sscanf(dir->msg, "action_on_purge %127s vol=%s action=%d",
               devname.c_str(), volumename.c_str(), &action) != 3) {
       dir->fsend(_("3916 Error scanning action_on_purge command\n"));