FreeBSD Bugzilla – Attachment 228533 Details for
Bug 259011
unzip omits a check for NULL and can cause pathdup() to seg-fault
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix for pathdup()
patch.txt (text/plain), 849 bytes, created by
Alex Kozlov
on 2021-10-09 06:35:43 UTC
(
hide
)
Description:
Fix for pathdup()
Filename:
MIME Type:
Creator:
Alex Kozlov
Created:
2021-10-09 06:35:43 UTC
Size:
849 bytes
patch
obsolete
>Index: unzip/unzip.c >@@ -211,6 +211,9 @@ > char *str; > size_t i, len; > >+ if (path == NULL) >+ return (0); >+ > len = strlen(path); > while (len && path[len - 1] == '/') > len--; >@@ -697,7 +700,11 @@ > mode_t filetype; > char *p, *q; > >- pathname = pathdup(archive_entry_pathname(e)); >+ if ((pathname = pathdup(archive_entry_pathname(e))) == 0) { >+ warningx("skipping NULL entry"); >+ ac(archive_read_data_skip(a)); >+ return; >+ } > filetype = archive_entry_filetype(e); > > /* sanity checks */ >@@ -760,7 +767,11 @@ > char *pathname; > mode_t filetype; > >- pathname = pathdup(archive_entry_pathname(e)); >+ if ((pathname = pathdup(archive_entry_pathname(e))) == 0) { >+ warningx("skipping NULL entry"); >+ ac(archive_read_data_skip(a)); >+ return; >+ } > filetype = archive_entry_filetype(e); > > /* I don't think this can happen in a zipfile.. */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 259011
:
228524
| 228533
Working