[BACK]Return to client-msg.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/Attic/client-msg.c between version 1.4 and 1.5

version 1.4, 2009/07/23 20:24:27 version 1.5, 2009/07/26 12:58:44
Line 70 
Line 70 
 int  int
 client_msg_fn_error(struct hdr *hdr, struct client_ctx *cctx)  client_msg_fn_error(struct hdr *hdr, struct client_ctx *cctx)
 {  {
         char    *errstr;          struct msg_print_data   data;
   
         if (hdr->size == SIZE_MAX)          if (hdr->size < sizeof data)
                 fatalx("bad MSG_ERROR size");                  fatalx("bad MSG_PRINT size");
           buffer_read(cctx->srv_in, &data, sizeof data);
   
         errstr = xmalloc(hdr->size + 1);          data.msg[(sizeof data.msg) - 1] = '\0';
         buffer_read(cctx->srv_in, errstr, hdr->size);          cctx->errstr = xstrdup(data.msg);
         errstr[hdr->size] = '\0';  
   
         cctx->errstr = errstr;  
         return (-1);          return (-1);
 }  }
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5