]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/catsearch.c
in unicode function convert_charset needs trailing zero, spotted by HAT
[netatalk.git] / etc / afpd / catsearch.c
index 82576652f01c2df3c04775138c16f757fa7bf737..b20dcba9811d5c7dbc95a0149e413c23e4dc20a8 100644 (file)
@@ -97,7 +97,7 @@ struct scrit {
     u_int16_t offcnt;           /* Offspring count */
        struct finderinfo finfo;    /* Finder info */
        char lname[64];             /* Long name */ 
-       char utf8name[512];         /* UTF8 name */
+       char utf8name[514];         /* UTF8 or UCS2 name */ /* for convert_charset dest_len parameter +2 */
 };
 
 /*
@@ -258,7 +258,7 @@ static int crit_check(struct vol *vol, struct path *path) {
        struct adouble *adp = NULL;
        time_t c_date, b_date;
        u_int32_t ac_date, ab_date;
-       static char convbuf[512];
+       static char convbuf[514]; /* for convert_charset dest_len parameter +2 */
        size_t len;
 
        if (S_ISDIR(path->st.st_mode)) {