mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-26 19:51:32 +00:00
!50 Fix: casefold fikename fuzz test panic
Merge pull request !50 from nieben/casefold_filename_fuzz_panic
This commit is contained in:
commit
a1ae71b22e
@ -479,10 +479,10 @@ f2fs_hash_t f2fs_dentry_hash(int encoding, int casefolded,
|
||||
unsigned char *buff;
|
||||
|
||||
if (len && casefolded) {
|
||||
buff = malloc(sizeof(char) * PATH_MAX);
|
||||
buff = malloc(sizeof(char) * F2FS_NAME_LEN);
|
||||
if (!buff)
|
||||
return -ENOMEM;
|
||||
dlen = table->ops->casefold(table, name, len, buff, PATH_MAX);
|
||||
dlen = table->ops->casefold(table, name, len, buff, F2FS_NAME_LEN);
|
||||
if (dlen < 0) {
|
||||
free(buff);
|
||||
goto opaque_seq;
|
||||
|
Loading…
Reference in New Issue
Block a user