Revert "ldb: User hexchars_upper from replace.h"
authorMichael Tokarev <mjt@tls.msk.ru>
Thu, 6 Feb 2025 15:11:02 +0000 (18:11 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 5 Jun 2025 16:12:34 +0000 (19:12 +0300)
Forwarded: not-needed
Debian-Specific: yes

This reverts commit 542cf01bfe530a83dfbc8a606d182c0a5a622059.

This commit switched ldb code to use hexchars_upper from libreplace,
introducing circular dependency between libraries.  Restore the status-quo.

Gbp-Pq: Name revert-ldb-use-hexchars_upper-from-replace.h.patch

lib/ldb/common/ldb_dn.c

index 5b8c0f4f580934b2199d0cf47e3fa95b8f85ba3c..1321f0d84205c966aeddcb28e6b770859512e62b 100644 (file)
@@ -232,10 +232,11 @@ static int ldb_dn_escape_internal(char *dst, const char *src, int len)
                case '\0': {
                        /* any others get \XX form */
                        unsigned char v;
+                       const char *hexbytes = "0123456789ABCDEF";
                        v = (const unsigned char)c;
                        *d++ = '\\';
-                       *d++ = hexchars_upper[v>>4];
-                       *d++ = hexchars_upper[v&0xF];
+                       *d++ = hexbytes[v>>4];
+                       *d++ = hexbytes[v&0xF];
                        break;
                }
                default: