pymumu / smartdns

A local DNS server to obtain the fastest website IP for the best Internet experience, support DoT, DoH. 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验,支持DoH,DoT。
https://pymumu.github.io/smartdns/
GNU General Public License v3.0
8.3k stars 1.06k forks source link

Bug Report:SmartDNS crashes due to misaligned memory access in `fast_ping.c`. #1779

Open dqp10515 opened 2 months ago

dqp10515 commented 2 months ago

Issue Description

SmartDNS crashes due to misaligned memory access in fast_ping.c.

System Information

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior fast_ping.c:1598:18 in

pymumu commented 2 months ago

The smartdns code currently does not strictly adhere to byte alignment, which may lead to degraded performance or exceptions on certain architectures during runtime.

In what situations is byte alignment required?

pymumu commented 2 months ago

Please check the latest code.

dqp10515 commented 2 months ago

Thank you for updating the code.