(the server will treat as a fatal error). GitHub issue 1200.
-/* $OpenBSD: client.c,v 1.123 2017/07/14 18:49:07 nicm Exp $ */
+/* $OpenBSD: client.c,v 1.124 2017/12/18 22:13:36 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
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. */