]> arthur.barton.de Git - netatalk.git/blobdiff - bin/nbp/nbprgstr.c
compute the right size if len == -1 in convert_string and use -1 than strlen(in)...
[netatalk.git] / bin / nbp / nbprgstr.c
index 4bcf429839a189756a60bf30b271a60e8b21a18e..bef33a1c01b54cd57513691a85aab848999655ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: nbprgstr.c,v 1.8 2009-10-14 02:24:05 didg Exp $
+ * $Id: nbprgstr.c,v 1.9 2009-10-29 11:35:58 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -80,7 +80,7 @@ int main(int ac, char **av)
 
     /* Convert the name */
     if ((size_t)(-1) == convert_string_allocate(CH_UNIX, chMac,
-                        av[optind], strlen(av[optind]), &convname))
+                        av[optind], -1, &convname))
         convname = av[optind];
 
     /*