[pubcookie-dev] WEBISO CVS update: fox; webiso/pubcookie/src verify_uwsecurid.c,1.1.2.2,1.1.2.3

Jim Fox fox at cac.washington.edu
Tue Oct 21 18:24:23 PDT 2003


Update of /usr/local/cvsroot/webiso/pubcookie/src
 In directory webiso-cvs.cac.washington.edu:/var/tmp/cvs-serv3779/webiso/pubcookie/src
 
 Modified Files:
       Tag: UWash3
 	verify_uwsecurid.c 
 Log Message:
 
 Fixes for securid.
 
 



Index: webiso/pubcookie/src/verify_uwsecurid.c
diff -c webiso/pubcookie/src/verify_uwsecurid.c:1.1.2.2 webiso/pubcookie/src/verify_uwsecurid.c:1.1.2.3
*** webiso/pubcookie/src/verify_uwsecurid.c:1.1.2.2	Wed Oct  8 16:18:20 2003
--- webiso/pubcookie/src/verify_uwsecurid.c	Tue Oct 21 18:24:21 2003
***************
*** 32,38 ****
   *   @return 0 on success, -1 if sid lookup fails, -3 next PRN,
   *          -2 on system error
   *
!  * $Id: verify_uwsecurid.c,v 1.1.2.2 2003/10/08 23:18:20 willey Exp $
   */
  
  #ifdef HAVE_CONFIG_H
--- 32,38 ----
   *   @return 0 on success, -1 if sid lookup fails, -3 next PRN,
   *          -2 on system error
   *
!  * $Id: verify_uwsecurid.c,v 1.1.2.3 2003/10/22 01:24:21 fox Exp $
   */
  
  #ifdef HAVE_CONFIG_H
***************
*** 312,325 ****
  {
  
      char *reason = NULL;  /* dunno about this */
!     char *card_id = NULL;
      int result;
      char *ptr;
      char *prn = NULL;
  
      /* if the securid field is in the form card_id=prn seperate it */
-     card_id = malloc((strlen(sid)>strlen(userid) 
- 			? strlen(sid) : strlen(userid))+1);
      ptr = card_id = (char *)sid;
      while( *ptr ) {
        if( *ptr == '=' ) {
--- 312,325 ----
  {
  
      char *reason = NULL;  /* dunno about this */
!     char *card_id;
      int result;
      char *ptr;
      char *prn = NULL;
  
+     if (!sid) return (-1);
+ 
      /* if the securid field is in the form card_id=prn seperate it */
      ptr = card_id = (char *)sid;
      while( *ptr ) {
        if( *ptr == '=' ) {
***************
*** 329,335 ****
        ptr++;
      }
      if( prn == NULL ) {
!         card_id = (char *)userid;
          prn = (char *)sid;
      }
  
--- 329,335 ----
        ptr++;
      }
      if( prn == NULL ) {
!         card_id = NULL;
          prn = (char *)sid;
      }
  



end of message


More information about the pubcookie-dev mailing list