]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/status.c
MachineType string is up to 16 characters
[netatalk.git] / etc / afpd / status.c
index cbf59892c157143fb74d9fef60b0de4f12a04bb1..ae51d26e28cc7fa973d133858f208fb761866d35 100644 (file)
@@ -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;