Ignore:
Timestamp:
Nov 27, 2012, 4:56:06 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated vendor to 3.6.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source4/lib/ldb/common/ldb_parse.c

    r740 r746  
    112112}
    113113
     114static bool need_encode(unsigned char cval)
     115{
     116        if (cval < 0x20 || cval > 0x7E || strchr(" *()\\&|!\"", cval)) {
     117                return true;
     118        }
     119        return false;
     120}
    114121
    115122/*
     
    125132
    126133        for (i=0;i<val.length;i++) {
    127                 if (!isprint(buf[i]) || strchr(" *()\\&|!\"", buf[i])) {
     134                if (need_encode(buf[i])) {
    128135                        len += 2;
    129136                }
     
    134141        len = 0;
    135142        for (i=0;i<val.length;i++) {
    136                 if (!isprint(buf[i]) || strchr(" *()\\&|!\"", buf[i])) {
     143                if (need_encode(buf[i])) {
    137144                        snprintf(ret+len, 4, "\\%02X", buf[i]);
    138145                        len += 3;
Note: See TracChangeset for help on using the changeset viewer.