atty icon indicating copy to clipboard operation
atty copied to clipboard

Possible soundness bug: alignment not checked

Open Plecra opened this issue 3 years ago • 1 comments

https://github.com/softprops/atty/blob/7b5df17888997d57c2c1c8f91da1db5691f49953/src/lib.rs#L131-L141

As far as I can tell, the pointer deference on line 141 in unsound, as there is no guarantee the vector will be properly aligned for FILE_NAME_INFO (which has an alignment of 4 due to FileNameLength being a u32)

Plecra avatar Jul 04 '21 16:07 Plecra