diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-12-19 00:01:18 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-12-19 00:01:18 +0000 |
commit | 641a885af81c3dd16f72afc2122b8a4945d61e0f (patch) | |
tree | 744ee0e7d0c29b72a9b91d0956416f89f389fbe9 /client.c | |
parent | 43a1294ed99c301bcbea808384535a37d8fd0066 (diff) | |
parent | 62144b9f57ea981ca2c35fe3466945b8234eba64 (diff) |
Merge branch 'obsd-master'
Diffstat (limited to 'client.c')
-rw-r--r-- | client.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -338,6 +338,10 @@ client_main(struct event_base *base, int argc, char **argv, int flags) size = 0; for (i = 0; i < argc; i++) size += strlen(argv[i]) + 1; + if (size > MAX_IMSGSIZE - (sizeof *data)) { + fprintf(stderr, "command too long\n"); + return (1); + } data = xmalloc((sizeof *data) + size); /* Prepare command for server. */ |