File: revert-ldb-use-hexchars_upper-from-replace.h.patch

package info (click to toggle)
samba 2%3A4.23.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 188,284 kB
  • sloc: ansic: 2,006,966; python: 272,596; sh: 72,233; xml: 51,608; perl: 36,088; makefile: 6,353; yacc: 5,320; exp: 1,582; lex: 1,504; cpp: 1,224; awk: 589; java: 119; csh: 58; pascal: 54; sed: 45; asm: 30
file content (36 lines) | stat: -rw-r--r-- 1,059 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Michael Tokarev <mjt@tls.msk.ru>
Date: Thu, 6 Feb 2025 18:11:02 +0300
Subject: Revert "ldb: User hexchars_upper from replace.h"
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.

---
 lib/ldb/common/ldb_dn.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/ldb/common/ldb_dn.c b/lib/ldb/common/ldb_dn.c
index 5b8c0f4f580..1321f0d8420 100644
--- a/lib/ldb/common/ldb_dn.c
+++ b/lib/ldb/common/ldb_dn.c
@@ -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:
-- 
2.39.5