]> arthur.barton.de Git - netatalk.git/commitdiff
check if mtoupath return NULL
authordidg <didg>
Mon, 26 May 2003 12:32:35 +0000 (12:32 +0000)
committerdidg <didg>
Mon, 26 May 2003 12:32:35 +0000 (12:32 +0000)
etc/afpd/catsearch.c

index a908e135b048ed4bc350d7e7ac38b62348da335c..7d0385e7a8db3c43acc0467c4ed44d00966bf683 100644 (file)
@@ -859,6 +859,8 @@ int catsearch_afp(AFPObj *obj, char *ibuf, int ibuflen,
 
        /* convert charset */   
        tmppath = mtoupath(vol, c1.utf8name, 1);
+        if (!tmppath)
+            return AFPERR_PARAM;
        memset (c1.utf8name, 0, 256);
        memcpy (c1.utf8name, tmppath, MIN(strlen(tmppath), 255));
     }