source:
npl/system/nss_ldap/patches/uid_t.patch
@
439f083
Last change on this file since 439f083 was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 1.1 KB |
-
ldap-pwd.c
Description: Fixed possible overflow in uid/gid handling Bug-Debian: http://bugs.debian.org/354093
a b _nss_ldap_parse_pw (LDAPMessage * e, 86 86 struct passwd *pw = (struct passwd *) result; 87 87 char *uid, *gid; 88 88 NSS_STATUS stat; 89 char tmpbuf[ sizeof "-4294967295"];89 char tmpbuf[ sizeof( uid_t ) * 8 / 3 + 2 ]; 90 90 size_t tmplen; 91 91 char *tmp; 92 92 93 tmpbuf[ sizeof(tmpbuf) - 1 ] = '\0'; 94 93 95 if (_nss_ldap_oc_check (e, "shadowAccount") == NSS_SUCCESS) 94 96 { 95 97 /* don't include password for shadowAccount */ … … _nss_ldap_parse_pw (LDAPMessage * e, 117 119 return stat; 118 120 119 121 tmp = tmpbuf; 120 tmplen = sizeof (tmpbuf) ;122 tmplen = sizeof (tmpbuf) - 1; 121 123 stat = 122 124 _nss_ldap_assign_attrval (e, AT (uidNumber), &uid, &tmp, &tmplen); 123 125 if (stat != NSS_SUCCESS) … … _nss_ldap_parse_pw (LDAPMessage * e, 133 135 } 134 136 135 137 tmp = tmpbuf; 136 tmplen = sizeof (tmpbuf) ;138 tmplen = sizeof (tmpbuf) - 1; 137 139 stat = 138 140 _nss_ldap_assign_attrval (e, ATM (LM_PASSWD, gidNumber), &gid, &tmp, 139 141 &tmplen);
Note: See TracBrowser
for help on using the repository browser.