Xenland / P2PCrypt-Server

Web of trust encrypted communications system. Text, Audio, Video, File Transfers, digital services, and more!
http://p2pcrypt.com
18 stars 8 forks source link

Invalid JSON crashes server #6

Closed Xenland closed 11 years ago

Xenland commented 11 years ago

The server crashes with segmentation fault if the string the client sends is invalid, this is from the "JSON C" library. The solution is to find a JSON validator, and validate the JSON before allowing the JSON C library to parse/read it at all.

Xenland commented 11 years ago

We have switched to using Jansson for creating, editing, parsing and validating JSON and have utilized the validation function in version 0.1.2 to prevent segmentation defaults.