udf: Fix uninitialized array access for some pathnames
Subsystems (2)
Jan Kara
reviewerPATCH 1/1 udf: Fix uninitialized array access for some pathnames
For filenames that begin with . and are between 2 and 5 characters long, UDF charset conversion code would read uninitialized memory in the output buffer. The only practical impact is that the name may be prepended a "unification hash" when it is not actually needed but still it is good to fix this.
Reported-by [email protected]
Signed-off-by Jan Kara <[email protected]>
--- fs/udf/unicode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I plan to merge this fix through my tree.
fs/udf/unicode.c +1 -1
@@ -247,7 +247,7 @@ static int udf_name_from_CS0(struct super_block *sb, }if (translate) { -if (str_o_len <=2 && str_o[0 ] =='.' && +if (str_o_len >0 && str_o_len <=2 && str_o[0 ] =='.' && (str_o_len ==1 || str_o[1 ] =='.' )) needsCRC =1 ;if (needsCRC) {
Signature · 1 line
2.35.3