catch sodium_init() return

This commit is contained in:
TLINDEN
2015-11-15 17:02:51 +01:00
parent ab3ff3182e
commit f7aa9d7aaf
5 changed files with 8 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
#include "static.h"
int main() {
sodium_init();
if(sodium_init() == -1) return 1;
unsigned char *t = ucmalloc(12);
if(crypto_box_open_easy(t, cipher, cipher_len, nonce, public_a, secret_b) == 0) {
if(memcmp(t, message, message_len) == 0) {