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