Changeset 738 for branches/samba-3.5.x/source4
- Timestamp:
- Nov 12, 2012, 7:10:02 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.5.x/source4/lib/ldb/common/ldb_parse.c
r414 r738 90 90 } 91 91 92 static bool need_encode(unsigned char cval) 93 { 94 if (cval < 0x20 || cval > 0x7E || strchr(" *()\\&|!\"", cval)) { 95 return true; 96 } 97 return false; 98 } 92 99 93 100 /* … … 103 110 104 111 for (i=0;i<val.length;i++) { 105 if ( !isprint(buf[i]) || strchr(" *()\\&|!\"",buf[i])) {112 if (need_encode(buf[i])) { 106 113 len += 2; 107 114 } … … 112 119 len = 0; 113 120 for (i=0;i<val.length;i++) { 114 if ( !isprint(buf[i]) || strchr(" *()\\&|!\"",buf[i])) {121 if (need_encode(buf[i])) { 115 122 snprintf(ret+len, 4, "\\%02X", buf[i]); 116 123 len += 3;
Note:
See TracChangeset
for help on using the changeset viewer.