SEGV on unknown address in tiffmedian
Summary
Hi there, I found a SEGV error in tiffmedian, the version of Libtiff is 99c28085 and the operation system is Ubuntu 18.04.6 LTS (docker), this crash with the following.
Version
Libtiff master branch(99c28085) && Libtiff release version(v4.4.0)
Steps to reproduce
Detected SEGV error in tiffmedian.
root@cm61a2s7hbn:/# ./libtiff/tools/tiffmedian -C 0 POC_tiffmedian_1 /dev/null
AddressSanitizer:DEADLYSIGNAL
=================================================================
==22825==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000004f6884 bp 0x7ffdddb95c60 sp 0x7ffdddb95b20 T0)
==22825==The signal is caused by a WRITE memory access.
==22825==Hint: address points to the zero page.
#0 0x4f6884 in main (/libtiff/tools/tiffmedian+0x4f6884)
#1 0x7f613068fc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
#2 0x41e009 in _start (/libtiff/tools/tiffmedian+0x41e009)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/libtiff/tools/tiffmedian+0x4f6884) in main
==22825==ABORTING
POC POC_tiffmedian_1
Platform
Ubuntu 18.04.6 LTS (docker), clang 12.0.1, clang++ 12.0.1
Credit
Xudong Cao (NCNIPC of China), Han Zheng (NCNIPC of China, Hexhive)
Thank you for your time!