[BACK]Return to channels.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/channels.c between version 1.363 and 1.364

version 1.363, 2017/05/30 14:23:52 version 1.364, 2017/05/31 00:43:04
Line 1065 
Line 1065 
         buffer_get(&c->input, (char *)&s4_req.dest_addr, 4);          buffer_get(&c->input, (char *)&s4_req.dest_addr, 4);
         have = buffer_len(&c->input);          have = buffer_len(&c->input);
         p = (char *)buffer_ptr(&c->input);          p = (char *)buffer_ptr(&c->input);
         if (memchr(p, '\0', have) == NULL)          if (memchr(p, '\0', have) == NULL) {
                 fatal("channel %d: decode socks4: user not nul terminated",                  error("channel %d: decode socks4: user not nul terminated",
                     c->self);                      c->self);
                   return -1;
           }
         len = strlen(p);          len = strlen(p);
         debug2("channel %d: decode socks4: user %s/%d", c->self, p, len);          debug2("channel %d: decode socks4: user %s/%d", c->self, p, len);
         len++;                                  /* trailing '\0' */          len++;                                  /* trailing '\0' */
Line 1085 
Line 1087 
         } else {                                /* SOCKS4A: two strings */          } else {                                /* SOCKS4A: two strings */
                 have = buffer_len(&c->input);                  have = buffer_len(&c->input);
                 p = (char *)buffer_ptr(&c->input);                  p = (char *)buffer_ptr(&c->input);
                   if (memchr(p, '\0', have) == NULL) {
                           error("channel %d: decode socks4a: host not nul "
                               "terminated", c->self);
                           return -1;
                   }
                 len = strlen(p);                  len = strlen(p);
                 debug2("channel %d: decode socks4a: host %s/%d",                  debug2("channel %d: decode socks4a: host %s/%d",
                     c->self, p, len);                      c->self, p, len);
                 len++;                          /* trailing '\0' */                  len++;                          /* trailing '\0' */
                 if (len > have)  
                         fatal("channel %d: decode socks4a: len %d > have %d",  
                             c->self, len, have);  
                 if (len > NI_MAXHOST) {                  if (len > NI_MAXHOST) {
                         error("channel %d: hostname \"%.100s\" too long",                          error("channel %d: hostname \"%.100s\" too long",
                             c->self, p);                              c->self, p);

Legend:
Removed from v.1.363  
changed lines
  Added in v.1.364