apache-php4.patch.modauthradius 664 B

12345678910111213141516171819202122
  1. Security Fix (CVE-2005-0108)
  2. http://security.lss.hr/en/index.php?page=details&ID=LSS-2005-01-02
  3. Index: mod_auth_radius.c
  4. --- mod_auth_radius.c.orig 2003-03-24 20:16:15 +0100
  5. +++ mod_auth_radius.c 2007-01-21 00:12:03 +0100
  6. @@ -971,9 +971,12 @@
  7. }
  8. return attr;
  9. }
  10. -#define radcpy(STRING, ATTR) {memcpy(STRING, ATTR->data, ATTR->length - 2); \
  11. - (STRING)[ATTR->length - 2] = 0;}
  12. +#define radcpy(STRING, ATTR) do { \
  13. + unsigned char len = ATTR->length; \
  14. + if (len >= 2) len-=2; \
  15. + memcpy(STRING, ATTR->data, len); \
  16. + (STRING)[len] = 0;} while (0)
  17. /* authentication module utility functions */
  18. static int