Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b0e3bd
)
e2fsck: handle malloc() failure when computing the log file name
author
zhanchengbin
<zhanchengbin1@huawei.com>
Fri, 31 Dec 2021 07:41:41 +0000
(15:41 +0800)
committer
Theodore Ts'o
<tytso@mit.edu>
Thu, 12 May 2022 00:54:30 +0000
(20:54 -0400)
Link:
https://lore.kernel.org/r/6d2844c7-0fd2-e432-3c7e-bb8de8c8a186@huawei.com
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/logfile.c
patch
|
blob
|
history
diff --git
a/e2fsck/logfile.c
b/e2fsck/logfile.c
index
63e9a12
..
7bdeae1
100644
(file)
--- a/
e2fsck/logfile.c
+++ b/
e2fsck/logfile.c
@@
-32,7
+32,7
@@
static void alloc_string(struct string *s, int len)
{
s->s = malloc(len);
/* e2fsck_allocate_memory(ctx, len, "logfile name"); */
- s->len =
len
;
+ s->len =
s->s ? len : 0
;
s->end = 0;
}