xaptum / xtt

A C implementation of the Trusted Transit protocol for securing Internet of Things (IoT) network traffic. Created to support the Xaptum Edge Network Fabric, an IoT Network Solution.
https://www.xaptum.com
Apache License 2.0
5 stars 5 forks source link

Saving a file does not always completely overwrite the old file #117

Closed drbild closed 4 years ago

drbild commented 4 years ago

The xtt_save_to_file function does not use the O_TRUNC flag when opening a file. Consequently, if the new contents are shorter than the old contents, the tail of the old contents remains at the end of the file.

zanebeckwith commented 4 years ago

Yep, good catch. Sorry about that.