Replaced sprintf() by safer snprintf(), removed possible buffer overflow

by one byte.
This commit is contained in:
Guus Sliepen 2000-05-02 10:16:50 +00:00
parent aeccaca829
commit 89610e3fba
2 changed files with 15 additions and 15 deletions

View file

@ -112,7 +112,7 @@ typedef struct conn_list_t {
valid key to be decrypted with) */
enc_key_t *public_key; /* the other party's public key */
enc_key_t *key; /* encrypt with this key */
char buffer[MAXBUFSIZE]; /* metadata input buffer */
char buffer[MAXBUFSIZE+1]; /* metadata input buffer */
int buflen; /* bytes read into buffer */
int reqlen; /* length of first request in buffer */
struct conn_list_t *nexthop; /* nearest meta-hop in this direction */