btrfs-progs/cmds
Wang Yugui 1822b12564 btrfs-progs: receive: fix a segfault when passing error pointer to free()
I noticed a segfault of 'btrfs receive'.

  $ gdb
   #0  process_clone (path=0x23829d0 "after.s1.txt", offset=0, len=2097152, clone_uuid=<optimized out>,
      clone_ctransid=<optimized out>, clone_path=0x2382920 "after.s1.txt", clone_offset=0, user=0x7ffe21985ba0)
      at cmds/receive.c:793
  793                     free(si->path);
  (gdb) p si
  $1 = (struct subvol_info *) 0xfffffffffffffffe

'si' was an error pointer value. Add the check to make sure we don't
pass such pointer to free().

Signed-off-by: Wang Yugui <wangyugui@e16-tech.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-09-12 18:25:32 +02:00
..
balance.c btrfs-progs: add constant for initial getopt values 2022-08-16 15:18:11 +02:00
commands.h btrfs-progs: split subvolume list to its own file 2021-10-08 20:47:03 +02:00
device.c btrfs-progs: device: add replace subcommand as alias to 1st level command 2022-08-16 15:18:11 +02:00
filesystem-du.c btrfs-progs: fi du: skip inaccessible files 2021-11-30 18:40:18 +01:00
filesystem-usage.c btrfs-progs: fi usage: fix calculation of chunk size for RAID1/DUP profiles 2021-11-18 10:17:33 +01:00
filesystem-usage.h
filesystem.c btrfs-progs: fi show: print missing device for a mounted file system 2022-08-16 15:18:11 +02:00
inspect-dump-super.c btrfs-progs: dump-super: exit with failure when printing bad superblock 2022-08-16 15:18:12 +02:00
inspect-dump-tree.c btrfs-progs: don't save block group root into super block 2022-09-12 15:31:27 +02:00
inspect-tree-stats.c btrfs-progs: change btrfs_file_extent_inline_item_len to take a slot 2022-03-09 15:13:13 +01:00
inspect.c btrfs-progs: add constant for initial getopt values 2022-08-16 15:18:11 +02:00
property.c btrfs-progs: props: don't translate value of compression=none 2022-04-25 18:30:28 +02:00
props.h btrfs-progs: prop set: add force parameter 2021-10-07 18:40:24 +02:00
qgroup.c btrfs-progs: add constant for initial getopt values 2022-08-16 15:18:11 +02:00
qgroup.h btrfs-progs: move all private definitions to cmds/qgroup.c 2021-09-07 19:21:14 +02:00
quota.c btrfs-progs: split open/close helpers from utils.c 2021-05-06 16:41:47 +02:00
receive-dump.c btrfs-progs: receive: implement FILEATTR command 2022-08-16 15:18:11 +02:00
receive-dump.h btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00
receive.c btrfs-progs: receive: fix a segfault when passing error pointer to free() 2022-09-12 18:25:32 +02:00
replace.c btrfs-progs: add constant for initial getopt values 2022-08-16 15:18:11 +02:00
rescue-chunk-recover.c btrfs-progs: remove the _nr from the item helpers 2022-03-09 15:13:13 +01:00
rescue-super-recover.c btrfs-progs: remove temporary buffer for super block 2021-11-05 12:50:03 +01:00
rescue.c btrfs-progs: rescue: introduce clear-uuid-tree 2021-11-22 21:45:37 +01:00
rescue.h btrfs-progs: unify GPL header comments 2021-09-07 13:58:44 +02:00
restore.c btrfs-progs: add constant for initial getopt values 2022-08-16 15:18:11 +02:00
scrub.c btrfs-progs: split unit related helpers from utils.c 2021-05-06 16:41:47 +02:00
send.c btrfs-progs: add constant for initial getopt values 2022-08-16 15:18:11 +02:00
subvolume-list.c btrfs-progs: subvol list: open code list_subvol_fill_paths in its caller 2021-10-08 20:47:04 +02:00
subvolume.c btrfs-progs: subvolume snapshot: added clarity how snapshot path is interprted 2022-02-16 22:48:01 +01:00