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

Diff for /src/usr.bin/rsync/ids.c between version 1.13 and 1.14

version 1.13, 2019/05/08 21:30:11 version 1.14, 2021/03/22 11:25:29
Line 26 
Line 26 
 #include "extern.h"  #include "extern.h"
   
 /*  /*
  * Free a list of struct ident previously allocated with idents_gid_add().   * Free a list of struct ident previously allocated with idents_add().
  * Does nothing if the pointer is NULL.   * Does nothing if the pointer is NULL.
  */   */
 void  void
Line 104 
Line 104 
         struct group    *grp;          struct group    *grp;
         struct passwd   *usr;          struct passwd   *usr;
         uint32_t         id;          uint32_t         id;
         int             valid;          int              valid;
   
         assert(!sess->opts->numeric_ids);          assert(!sess->opts->numeric_ids);
   
Line 267 
Line 267 
 idents_recv(struct sess *sess,  idents_recv(struct sess *sess,
         int fd, struct ident **ids, size_t *idsz)          int fd, struct ident **ids, size_t *idsz)
 {  {
         int32_t  id;          uint32_t id;
         uint8_t  sz;          uint8_t  sz;
         void    *pp;          void    *pp;
   
Line 299 
Line 299 
                 } else if (sz == 0)                  } else if (sz == 0)
                         WARNX("zero-length name in identifier list");                          WARNX("zero-length name in identifier list");
   
                   assert(id < INT32_MAX);
                 (*ids)[*idsz].id = id;                  (*ids)[*idsz].id = id;
                 (*ids)[*idsz].name = calloc(sz + 1, 1);                  (*ids)[*idsz].name = calloc(sz + 1, 1);
                 if ((*ids)[*idsz].name == NULL) {                  if ((*ids)[*idsz].name == NULL) {

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14