projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e43df65
)
Increase buffer size in find_loop_by_file()
author
Hannes Reinecke
<hare@suse.de>
Tue, 21 Oct 2008 08:22:16 +0000
(10:22 +0200)
committer
Christophe Varoqui
<christophe.varoqui@free.fr>
Tue, 21 Apr 2009 21:34:29 +0000
(23:34 +0200)
find_loop_by_file() uses an internal buffer of 20 chars, which is compared
to a buffer of the size of 64 chars. Not good.
References: 436428
Signed-off-by: Hannes Reinecke <hare@suse.de>
kpartx/lopart.c
patch
|
blob
|
history
diff --git
a/kpartx/lopart.c
b/kpartx/lopart.c
index
33f312b
..
79d8328
100644
(file)
--- a/
kpartx/lopart.c
+++ b/
kpartx/lopart.c
@@
-105,7
+105,7
@@
is_loop_device (const char *device)
extern char *
find_loop_by_file (const char * filename)
{
- char dev[
20
];
+ char dev[
64
];
char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" };
int i, j, fd;
struct stat statbuf;