Changeset 746 for vendor/current/source4/lib
- Timestamp:
- Nov 27, 2012, 4:56:06 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source4/lib/ldb/common/ldb_parse.c
r740 r746 112 112 } 113 113 114 static bool need_encode(unsigned char cval) 115 { 116 if (cval < 0x20 || cval > 0x7E || strchr(" *()\\&|!\"", cval)) { 117 return true; 118 } 119 return false; 120 } 114 121 115 122 /* … … 125 132 126 133 for (i=0;i<val.length;i++) { 127 if ( !isprint(buf[i]) || strchr(" *()\\&|!\"",buf[i])) {134 if (need_encode(buf[i])) { 128 135 len += 2; 129 136 } … … 134 141 len = 0; 135 142 for (i=0;i<val.length;i++) { 136 if ( !isprint(buf[i]) || strchr(" *()\\&|!\"",buf[i])) {143 if (need_encode(buf[i])) { 137 144 snprintf(ret+len, 4, "\\%02X", buf[i]); 138 145 len += 3;
Note:
See TracChangeset
for help on using the changeset viewer.