libhv icon indicating copy to clipboard operation
libhv copied to clipboard

下载文件大小超过2G抛异常

Open wsliangchen opened this issue 3 years ago • 2 comments

content-length 超过int最大值时 on_headers_complete函数中使用atoi导致int类型的中间变量溢出 对string revers一个负值,由此引申出来的问题,代码中一些结构体定义类型用size_t导致win平台下32/64位表现不一致 PX@MHM_AW7IT))WFDVF$(D

wsliangchen avatar Sep 20 '22 03:09 wsliangchen

https://github.com/ithewei/libhv/commit/08d6130162f21f3a4031ebfb573779d05aefee44

ithewei avatar Sep 20 '22 04:09 ithewei

统一用了size_t定义,不考虑32位下超过4G问题

ithewei avatar Sep 20 '22 04:09 ithewei