btrfsprogs/0128-btrfs-progs-fix-regexec-to-only-work-if-we-actually-.patch
David Sterba db07609875 - btrfs-progs-fix-open_ctree_usage_segfaults.patch: fix
segfaults from bnc#710486 due to unchecked usage of return
  value of open_ctree()
  [fixed compilation warnings]

- pull upstream, replace existing patches, spec update
- update 'restore' utility
  - lzo support
  - tools may now take earlies superblock when opening the fs
  - other fixes
- pull integration-20111030 branch
  - mkfs: force mkfs if desired
  - other fixes
- add btrfs-dump-super to mkinitrd
- other fixes
  - skip non-existent devices or without media
  - documentation updates
  - scrubbing single device
  - graceful error handling when opening fs fails

- updated mkinitrd script to scan devices before mount (bnc#727383)

OBS-URL: https://build.opensuse.org/package/show/filesystems/btrfsprogs?expand=0&rev=115
2011-12-14 23:25:51 +00:00

32 lines
1016 B
Diff

From 1b8b3c3579ee127b174a850213df7ad81edd5710 Mon Sep 17 00:00:00 2001
From: Josef Bacik <josef@redhat.com>
Date: Fri, 2 Dec 2011 12:52:15 -0500
Subject: [PATCH 29/35] btrfs-progs: fix regexec to only work if we actually
have a regexec
We were unconditionally executing our regular expression, even though we may not
have one, so check to make sure mreg is not null before calling regexec.
Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
---
restore.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/restore.c b/restore.c
index 6433378..a4ccb18 100644
--- a/restore.c
+++ b/restore.c
@@ -638,7 +638,7 @@ static int search_dir(struct btrfs_root *root, struct btrfs_key *key,
/* full path from root of btrfs being restored */
snprintf(fs_name, 4096, "%s/%s", dir, filename);
- if (REG_NOMATCH == regexec(mreg, fs_name, 0, NULL, 0))
+ if (mreg && REG_NOMATCH == regexec(mreg, fs_name, 0, NULL, 0))
goto next;
/* full path from system root */
--
1.7.6.233.gd79bc