* FIX: gentoo: cannot set $CNID_CONFIG
* FIX: ubuntu: servername was empty
* FIX: Solaris: configure script failed to enable DDP module
+* FIX: AppleDouble buffer overrun by extremely long filename
* UPD: afpd: return version info with machine type in DSIGetStatus
Changes in 2.1.5
*/
int ad_setname(struct adouble *ad, const char *path)
{
+ int len;
+ if ((len = strlen(path)) > ADEDLEN_NAME)
+ len = ADEDLEN_NAME;
if (path && ad_getentryoff(ad, ADEID_NAME)) {
- ad_setentrylen( ad, ADEID_NAME, strlen( path ));
- memcpy(ad_entry( ad, ADEID_NAME ), path, ad_getentrylen( ad, ADEID_NAME ));
+ ad_setentrylen( ad, ADEID_NAME, len);
+ memcpy(ad_entry( ad, ADEID_NAME ), path, len);
return 1;
}
return 0;