Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
breg: fix crash when manually setting regexwhere
When manually setting the regular expression during restore like with: OK to run? (yes/mod/no): mod ->11: File Relocation ->4: Enter a regexp ->Please enter a valid regexp (!from!to!): !what!with! ->6: Use this ? The director crashed. This happens because the member regex_t preg of the class BareosRegex was not zero initialized correctly. This caused the freeing of random memory in void regfree(regex_t* preg). Now all members of class BareosRegex are zero initialized and the problem is fixed. This problem also causes the filedaemon to crash when regexwhere is specified in the restore job configuration. On the second restore run the filedaemon crashes. Fixes# 1211: bareos director and bareos fd crash when regexwhere is specified
- Loading branch information