Blob Blame History Raw
diff -up jwhois-4.0/src/jwhois.c.idnfallback jwhois-4.0/src/jwhois.c
--- jwhois-4.0/src/jwhois.c.idnfallback	2014-04-24 15:32:39.259194588 +0100
+++ jwhois-4.0/src/jwhois.c	2014-04-25 14:19:55.917151039 +0100
@@ -118,9 +118,9 @@ main(int argc, char **argv)
     }
 #ifdef LIBIDN
   rc = idna_to_ascii_lz(argv[optind], &idn, 0);
-  if (rc != IDNA_SUCCESS)
+  if ( (rc != IDNA_SUCCESS) && ((idn = strdup(argv[optind])) == NULL ) )
     {
-      printf("[IDN encoding of '%s' failed with error code %d]\n", argv[optind], rc);
+      printf("[%s]\n", _("Error allocating memory"));
       exit(1);
     }
   qstring = realloc(qstring, count+strlen(idn)+1);