Small fix to enable reading from stdin as well.
[openssl.git] / apps / errstr.c
index 4650379589df24231421af31affce22e07b6d231..2c6204647692bf5150db3104958ec22c8987f290 100644 (file)
@@ -104,7 +104,10 @@ int MAIN(int argc, char **argv)
        for (i=1; i<argc; i++)
                {
                if (sscanf(argv[i],"%lx",&l))
-                       printf("%s\n",ERR_error_string(l,buf));
+                       {
+                       ERR_error_string_n(l, buf, sizeof buf);
+                       printf("%s\n",buf);
+                       }
                else
                        {
                        printf("%s: bad error code\n",argv[i]);