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

Diff for /src/usr.bin/ssh/Attic/bufaux.c between version 1.44 and 1.46

version 1.44, 2006/08/03 03:34:41 version 1.46, 2008/06/10 23:21:34
Line 178 
Line 178 
                 return (NULL);                  return (NULL);
         }          }
         /* Append a null character to make processing easier. */          /* Append a null character to make processing easier. */
         value[len] = 0;          value[len] = '\0';
         /* Optionally return the length of the string. */          /* Optionally return the length of the string. */
         if (length_ptr)          if (length_ptr)
                 *length_ptr = len;                  *length_ptr = len;
Line 193 
Line 193 
         if ((ret = buffer_get_string_ret(buffer, length_ptr)) == NULL)          if ((ret = buffer_get_string_ret(buffer, length_ptr)) == NULL)
                 fatal("buffer_get_string: buffer error");                  fatal("buffer_get_string: buffer error");
         return (ret);          return (ret);
   }
   
   void *
   buffer_get_string_ptr(Buffer *buffer, u_int *length_ptr)
   {
           void *ptr;
           u_int len;
   
           len = buffer_get_int(buffer);
           if (len > 256 * 1024)
                   fatal("buffer_get_string_ptr: bad string length %u", len);
           ptr = buffer_ptr(buffer);
           buffer_consume(buffer, len);
           if (length_ptr)
                   *length_ptr = len;
           return (ptr);
 }  }
   
 /*  /*

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.46