]> arthur.barton.de Git - netatalk.git/blobdiff - etc/papd/lp.c
compute the right size if len == -1 in convert_string and use -1 than strlen(in)...
[netatalk.git] / etc / papd / lp.c
index 3b817b9f4d3c7d1cdca4d496ad517b9dafcdf377..e077a8d5b03fb3d86d12d03b57c6d9c16b9dc866 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: lp.c,v 1.31 2009-10-22 13:40:11 franklahm Exp $
+ * $Id: lp.c,v 1.32 2009-10-29 11:35:58 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -164,7 +164,7 @@ static void translate(charset_t from, charset_t dest, char **option)
     if (*option != NULL) {
         convert_octal(*option, from);
         if (from) {
-             if ((size_t) -1 != (convert_string_allocate(from, dest, *option, strlen(*option), &translated)) ) {
+             if ((size_t) -1 != (convert_string_allocate(from, dest, *option, -1, &translated)) ) {
                  free (*option);
                  *option = translated;
              }