libidn-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS libidn/lib


From: libidn-commit
Subject: CVS libidn/lib
Date: Sat, 02 Oct 2004 21:24:27 +0200

Update of /home/cvs/libidn/lib
In directory dopio:/tmp/cvs-serv2730

Modified Files:
        toutf8.c 
Log Message:
Revert, don't use strdup.


--- /home/cvs/libidn/lib/toutf8.c       2004/10/02 19:12:28     1.12
+++ /home/cvs/libidn/lib/toutf8.c       2004/10/02 19:24:26     1.13
@@ -113,7 +113,13 @@
   int have_error = 0;
 
   if (strcmp (to_codeset, from_codeset) == 0)
-    return strdup (str);
+    {
+      char *q;
+      q = malloc (strlen (str) + 1);
+      if (!q)
+       return NULL;
+      return strcpy (q, str);
+    }
 
   cd = iconv_open (to_codeset, from_codeset);
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]