X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fprotocol.h;h=d6a35be77230215b239b9bd6da8b478258cddea0;hp=100543a1f876fbc14e98e088ba2547efbbcc1a0e;hb=e810545dc2ae158745624c1575b76c55f883c892;hpb=02746165a21a4a495d0069526c9a2355110a5784 diff --git a/src/protocol.h b/src/protocol.h index 100543a1..d6a35be7 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -56,9 +56,12 @@ typedef struct past_request_t { extern bool tunnelserver; -/* Maximum size of strings in a request */ +/* Maximum size of strings in a request. + * scanf terminates %2048s with a NUL character, + * but the NUL character can be written after the 2048th non-NUL character. + */ -#define MAX_STRING_SIZE 2048 +#define MAX_STRING_SIZE 2049 #define MAX_STRING "%2048s" #include "edge.h"