Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dump on ubuntu16.04 #1149

Open
mofywong opened this issue Feb 26, 2019 · 1 comment
Open

dump on ubuntu16.04 #1149

mofywong opened this issue Feb 26, 2019 · 1 comment

Comments

@mofywong
Copy link

minitar dump when I use it to compress(-cjf) a long filename(cn_windows_10_consumer_edition_version_1809_updated_sept_2018_x64_dvd_051b7719.iso). I trace and find that "t->filesystem_table[t->current->filesystem_id].name_max "is equal "0" in archive_read_disk_posix.c:2379。continue I trace where this variable set,it's archive_read_disk_posix.c:1674 and sfs is get from fstatvfs(Line:1635). Last, I test the system function(fstatvfs and statvfs) in Ubuntu16.04, the value of sfs.f_namemax is always 0.

@lukem
Copy link
Contributor

lukem commented Jun 10, 2023

The crash should be fixed in PR #1903.

mmatuska pushed a commit that referenced this issue Jul 13, 2023
Add error handling to the USE_READDIR_R code paths that set name_max
from struct statfs or statvfs; if the determined name_max == 0
then return an error.

Avoids a crash in tree_dir_next_posix() when the calculation of
dirent_size from name_max is too small for the memory allocated
for struct dirent.

This may fix Github issue #1149
This may fix NetBSD PR https://gnats.netbsd.org/56080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants