tar: fix fallout of last_char_is(NULL) no longer being allowed

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2020-10-02 18:30:53 +02:00
parent a90a54aead
commit 16e82c61d4

View File

@ -352,7 +352,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle)
/* case 0: */
case '0':
#if ENABLE_FEATURE_TAR_OLDGNU_COMPATIBILITY
if (last_char_is(file_header->name, '/')) {
if (file_header->name && last_char_is(file_header->name, '/')) {
goto set_dir;
}
#endif