lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1085 - nss-pam-ldapd/nslcd

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1085 - nss-pam-ldapd/nslcd



Author: arthur
Date: Fri May  7 22:40:13 2010
New Revision: 1085
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1085

Log:
fix buffer overflow and implement test for it

Modified:
   nss-pam-ldapd/nslcd/myldap.c

Modified: nss-pam-ldapd/nslcd/myldap.c
==============================================================================
--- nss-pam-ldapd/nslcd/myldap.c        Fri May  7 13:23:38 2010        (r1084)
+++ nss-pam-ldapd/nslcd/myldap.c        Fri May  7 22:40:13 2010        (r1085)
@@ -1524,7 +1524,7 @@
   for (;*src!='\0';src++)
   {
     /* check if char will fit */
-    if (pos>=(buflen+4))
+    if ((pos+4)>=buflen)
       return -1;
     /* do escaping for some characters */
     switch (*src)
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits