home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume1 / 8712 / sush.bug < prev    next >
Encoding:
Text File  |  1993-09-02  |  1.3 KB  |  47 lines

  1. Article 341 of comp.sources.bugs:
  2. Path: tut!osu-cis!cbosgd!clyde!rutgers!sri-spam!ames!sdcsvax!ucsdhub!esosun!seismo!uunet!mcvax!cernvax!ethz!forty2!vogel
  3. From: vogel@forty2.UUCP (Stefan Vogel)
  4. Newsgroups: comp.sources.bugs
  5. Subject: bug in sush
  6. Message-ID: <123@forty2.UUCP>
  7. Date: 11 Dec 87 17:02:58 GMT
  8. Reply-To: vogel@forty2.UUCP (Stefan Vogel)
  9. Organization: Exp. Physics University Zuerich
  10. Lines: 33
  11.  
  12. We found the following bug in sushperm.c of the sush distribution:
  13.  
  14. In routine addgroup the pointer gpmem was incremented before it was used.
  15. So, the first member of the group was never found, and the reference to
  16. the last member lead to an illegal memory reference (NULL pointer!).
  17.  
  18. original code:
  19.  
  20.      gpmem = gpt->gr_mem;
  21.      while(*gpmem++) {  <------------------gpmem is incremented
  22.          if(!strcmp(user,*gpmem))  <---gpmem is used
  23.              ok++;
  24.      }
  25.  
  26.      /* auth failed - return */
  27.  
  28. corrected code:
  29.  
  30.      gpmem = gpt->gr_mem;
  31.      while(*gpmem) {
  32.          if(!strcmp(user,*gpmem++))
  33.              ok++;
  34.      }
  35.  
  36.      /* auth failed - return */
  37.  
  38.                               Stefan Vogel, Simon Poole
  39.                               Inst. for Theoretical Physics
  40.                               University of Zuerich
  41.                               Switzerland
  42.  
  43.                               UUCP:   ....mcvac!cernvax!forty2!vogel
  44.                               BITNET: k524911@czhrzu1a
  45.  
  46.  
  47.