Revision 5034937a

View differences:

mongoose.c
4023 4023

  
4024 4024
void mg_printf_websocket_frame(struct mg_connection *nc, int op,
4025 4025
                               const char *fmt, ...) {
4026
  char mem[4192], *buf = mem;
4026
  char mem[BUFSIZ], *buf = mem;
4027 4027
  va_list ap;
4028 4028
  int len;
4029 4029

  
......
6329 6329
      va_end(ap_copy);
6330 6330
    }
6331 6331
    /* LCOV_EXCL_STOP */
6332
  } else if (len > (int) size) {
6332
  } else if (len >= (int) size) {
6333 6333
    /* Standard-compliant code path. Allocate a buffer that is large enough. */
6334 6334
    if ((*buf = (char *) MG_MALLOC(len + 1)) == NULL) {
6335 6335
      len = -1; /* LCOV_EXCL_LINE */

Also available in: Unified diff