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:
5308fc1
)
e2fsck: handle invalid percent expansions in the log filename
author
Theodore Ts'o
<tytso@mit.edu>
Thu, 11 Aug 2022 02:48:13 +0000
(22:48 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Thu, 11 Aug 2022 02:48:13 +0000
(22:48 -0400)
Add a missing default: case when expanding percent expansions in the
log file specified in /etc/e2fsck.conf.
Addresses-Coverity-Bug: 1500757
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
7bdeae1
..
9d79eed
100644
(file)
--- a/
e2fsck/logfile.c
+++ b/
e2fsck/logfile.c
@@
-155,6
+155,9
@@
static void expand_percent_expression(e2fsck_t ctx, char ch,
case 'Y':
sprintf(buf, "%d", tm->tm_year + 1900);
break;
+ default:
+ sprintf(buf, "%%%c", ch);
+ break;
}
append_string(s, buf, 0);
}