fix two mistakes w.r.t. ERR_LIB_* parameters in ERR_add_error_txt()
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Tue, 10 Mar 2020 09:39:22 +0000 (10:39 +0100)
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>
Tue, 10 Mar 2020 15:09:44 +0000 (16:09 +0100)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/11142)

crypto/err/err_prn.c

index 9a58898..1647d93 100644 (file)
@@ -68,7 +68,7 @@ void ERR_add_error_txt(const char *separator, const char *txt)
     if (separator == NULL)
         separator = "";
     if (err == 0)
-        put_error(ERR_LIB_CMP, NULL, 0, "", 0);
+        put_error(ERR_LIB_NONE, NULL, 0, "", 0);
 
     do {
         size_t available_len, data_len;
@@ -125,7 +125,7 @@ void ERR_add_error_txt(const char *separator, const char *txt)
                 ERR_add_error_data(2, separator, tmp);
                 OPENSSL_free(tmp);
             }
-            put_error(ERR_LIB_CMP, func, err, file, line);
+            put_error(ERR_GET_LIB(err), func, err, file, line);
             txt = curr;
         } else {
             if (trailing_separator) {