Displaying 5 results from an estimated 5 matches for "btrfs_scan_one_dir".
2012 Oct 24
2
[BUG][PATCH][BTRFS-PROGS] Bug overflow fix
If there''s is a long name directory exists in the /dev, then an
overflow will hit in function utils.c btrfs_scan_one_dir:1013!
The minimal fix is to use snprintf instead of strcpy.
The reason why not using strncpy is that, if there is no null byte
among the first n bytes of src, the string placed in dest
will not be null - terminated.
Signed-off-by: Rock Lee <zimilo@code-trick.com>
---
utils.c | 5 +++...
2010 Dec 05
1
[PATCH 4/5][REPOST][BTRFS-PROGS] Avoid to scan cdrom and floppy
...es")){
+
+ if( argc >2 ){
+ fprintf(stderr, "ERROR: too may arguments\n");
+ return 22;
+ }
+
+ checklist = 0;
+ devstart += 1;
+ }
+
+ if(argc<=devstart){
int ret;
printf("Scanning for Btrfs filesystems\n");
- ret = btrfs_scan_one_dir("/dev", 1);
+ ret = btrfs_scan_block_devices(1, checklist);
if (ret){
fprintf(stderr, "ERROR: error %d while scanning\n",
ret);
return 18;
@@ -547,7 +561,7 @@ int do_scan(int argc, char **argv)
return 10;
}
- for( i = 1 ; i < argc ; i++ ){
+ for( i = devst...
2012 Jun 05
13
New btrfs-progs integration branch
...offredo Baroncelli (1):
scrub_fs_info( ) file handle leaking
Hubert Kario (2):
Fix segmentation fault when opening invalid file system
man: fix btrfs man page formatting
Jan Kara (1):
mkfs: Handle creation of filesystem larger than the first device
Jim Meyering (5):
btrfs_scan_one_dir: avoid use-after-free on error path
mkfs: use strdup in place of strlen,malloc,strcpy sequence
restore: don''t corrupt stack for a zero-length command-line argument
avoid several strncpy-induced buffer overruns
mkfs: avoid heap-buffer-read-underrun for zero-length &q...
2013 Sep 05
12
[PATCH 0/5] Memory leaks amended
...sed on Daivd''s branch ''integration-20130903''.
Gui Hecheng (5):
btrfs-progs:free local variable buf upon unsuccessful returns
btrfs-progs:local variable memory freed
btrfs-progs: missing tree-freeing statements added
btrfs-progs:free the local list pending_list in btrfs_scan_one_dir
btrfs-progs:free strdup()s that are not freed
btrfs-image.c | 2 ++
cmds-check.c | 5 +++++
cmds-subvolume.c | 48 ++++++++++++++++++++++++++++++++++--------------
mkfs.c | 12 +++++++++++-
utils.c | 10 ++++++++--
5 files changed, 60 insertions(+), 17 deletions(-)...
2011 Jul 18
5
[PATCH v3 0/5] btrfs-progs: scrub interface
This is the next patch series for scrub userland tools.
Change log v1->v2:
- commands now reachable as "btrfs scrub ..." instead of "btrfs filesystem
scrub ..."
- ability to scrub a single device instead of a whole file system
- superfluous command line options removed
- resume is now a separate command ("scrub resume") instead of "scrub start -r"
-