]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb: User hexchars_upper from replace.h
authorVolker Lendecke <vl@samba.org>
Tue, 10 Sep 2024 08:02:04 +0000 (10:02 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 12 Nov 2024 12:09:35 +0000 (12:09 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
lib/ldb/common/ldb_dn.c

index e785a6d9e3d7d1a030c1837a2a0035d39980dc21..19350cc610ce2850c7c7c0f4a61c5e468546c422 100644 (file)
@@ -232,11 +232,10 @@ 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++ = hexbytes[v>>4];
-                       *d++ = hexbytes[v&0xF];
+                       *d++ = hexchars_upper[v>>4];
+                       *d++ = hexchars_upper[v&0xF];
                        break;
                }
                default: