]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/md5.c
<rdar://problem/15386424> cups.org: gunzip bug prevents use of some gzip'd PPD files...
[thirdparty/cups.git] / cups / md5.c
index f7c42ad24fd947a1db3ba146572e8def2e7c196b..843890d4d2ed75cf8a914056621a8935d59bd3a0 100644 (file)
@@ -1,31 +1,30 @@
 /*
- * "$Id: md5.c 9042 2010-03-24 00:45:34Z mike $"
+ * "$Id$"
  *
- *   Private MD5 implementation for CUPS.
+ * Private MD5 implementation for CUPS.
  *
- *   Copyright 2007-2010 by Apple Inc.
- *   Copyright 2005 by Easy Software Products
+ * Copyright 2007-2013 by Apple Inc.
+ * Copyright 2005 by Easy Software Products
+ * Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
  *
- *   Copyright (C) 1999 Aladdin Enterprises.  All rights reserved.
+ * This software is provided 'as-is', without any express or implied
+ * warranty.  In no event will the authors be held liable for any damages
+ * arising from the use of this software.
  *
- *   This software is provided 'as-is', without any express or implied
- *   warranty.  In no event will the authors be held liable for any damages
- *   arising from the use of this software.
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
  *
- *   Permission is granted to anyone to use this software for any purpose,
- *   including commercial applications, and to alter it and redistribute it
- *   freely, subject to the following restrictions:
+ * 1. The origin of this software must not be misrepresented; you must not
+ *    claim that you wrote the original software. If you use this software
+ *    in a product, an acknowledgment in the product documentation would be
+ *    appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ *    misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
  *
- *   1. The origin of this software must not be misrepresented; you must not
- *      claim that you wrote the original software. If you use this software
- *      in a product, an acknowledgment in the product documentation would be
- *      appreciated but is not required.
- *   2. Altered source versions must be plainly marked as such, and must not be
- *      misrepresented as being the original software.
- *   3. This notice may not be removed or altered from any source distribution.
- *
- *   L. Peter Deutsch
- *   ghost@aladdin.com
+ * L. Peter Deutsch
+ * ghost@aladdin.com
  */
 /*
   Independent implementation of MD5 (RFC 1321).
@@ -133,7 +132,8 @@ _cups_md5_process(_cups_md5_state_t *pms, const unsigned char *data /*[64]*/)
     int i;
 
     for (i = 0; i < 16; ++i, xp += 4)
-       X[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
+       X[i] = (unsigned)xp[0] + ((unsigned)xp[1] << 8) +
+              ((unsigned)xp[2] << 16) + ((unsigned)xp[3] << 24);
 
 #else  /* !ARCH_IS_BIG_ENDIAN */
 
@@ -342,5 +342,5 @@ _cupsMD5Finish(_cups_md5_state_t *pms, unsigned char digest[16])
 
 
 /*
- * End of "$Id: md5.c 9042 2010-03-24 00:45:34Z mike $".
+ * End of "$Id$".
  */