/[grub]/grub/stage2/md5.c
ViewVC logotype

Diff of /grub/stage2/md5.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by okuji, Sat Oct 21 00:13:55 2000 UTC revision 1.3 by okuji, Wed Jan 2 17:48:41 2002 UTC
# Line 1  Line 1 
1  /* md5.c - an implementation of the MD5 algorithm and MD5 crypt */  /* md5.c - an implementation of the MD5 algorithm and MD5 crypt */
2  /*  /*
3   *  GRUB  --  GRand Unified Bootloader   *  GRUB  --  GRand Unified Bootloader
4   *  Copyright (C) 2000  Free Software Foundation, Inc.   *  Copyright (C) 2000, 2001  Free Software Foundation, Inc.
5   *   *
6   *  This program is free software; you can redistribute it and/or modify   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
# Line 215  md5_password (const char *key, char *cry Line 215  md5_password (const char *key, char *cry
215    unsigned char *digest;    unsigned char *digest;
216    
217    if (check)    if (check)
218      saltlen = strstr (salt, "$") - salt;      {
219          /* If our crypted password isn't 3 chars, then it can't be md5
220             crypted. So, they don't match.  */
221          if (strlen(crypted) <= 3)
222            return 1;
223          
224          saltlen = strstr (salt, "$") - salt;
225        }
226    else    else
227      {      {
228        char *end = strstr (salt, "$");        char *end = strstr (salt, "$");

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26