diff options
-rw-r--r-- | receiver.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/receiver.cpp b/receiver.cpp index 4a0269a..88de5fc 100644 --- a/receiver.cpp +++ b/receiver.cpp | |||
@@ -107,7 +107,7 @@ public: | |||
107 | // Dump key | 107 | // Dump key |
108 | char hexkey[2*AES_KEY_LENGTH + 1]; | 108 | char hexkey[2*AES_KEY_LENGTH + 1]; |
109 | for (int i=0; i<AES_KEY_LENGTH; ++i) | 109 | for (int i=0; i<AES_KEY_LENGTH; ++i) |
110 | sprintf(hexkey + 2 * i, "%02x", _key[i]); | 110 | snprintf(hexkey + 2 * i, 3, "%02x", _key[i]); |
111 | 111 | ||
112 | // Glue together serialisation | 112 | // Glue together serialisation |
113 | char filename[FILENAME_LENGTH + 1]; | 113 | char filename[FILENAME_LENGTH + 1]; |
@@ -157,7 +157,7 @@ public: | |||
157 | if (_fd < 0) | 157 | if (_fd < 0) |
158 | _fd = ensure_file(); | 158 | _fd = ensure_file(); |
159 | if (_fd < 0) { | 159 | if (_fd < 0) { |
160 | std::cerr << "Error: Can't create file " << _filename << " for session " << std::hex << _session_id; | 160 | std::cerr << "Error: Can't create file " << _filename << " for session " << std::hex << _session_id << std::endl; |
161 | return; | 161 | return; |
162 | } | 162 | } |
163 | 163 | ||