X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fafpd%2Fstatus.c;fp=etc%2Fafpd%2Fstatus.c;h=ae51d26e28cc7fa973d133858f208fb761866d35;hb=25ca059b795321076af8d8d422ba6a473ef04cf6;hp=cbf59892c157143fb74d9fef60b0de4f12a04bb1;hpb=a6101f0b0ee85861d969058c914f16a09246c8ed;p=netatalk.git diff --git a/etc/afpd/status.c b/etc/afpd/status.c index cbf59892..ae51d26e 100644 --- a/etc/afpd/status.c +++ b/etc/afpd/status.c @@ -130,13 +130,13 @@ static void status_machine(char *data) #else /* !AFS */ const char *machine = "Netatalk %s"; #endif /* AFS */ - char buf[64]; + char buf[AFPSTATUS_MACHLEN+1]; memcpy(&status, start + AFPSTATUS_MACHOFF, sizeof(status)); data += ntohs( status ); // len = strlen( machine ); - len = snprintf(buf, 64, machine, VERSION); + len = snprintf(buf, AFPSTATUS_MACHLEN+1, machine, VERSION); *data++ = len; memcpy( data, buf, len ); data += len;