Ignore:
Timestamp:
Jul 2, 2011, 4:01:14 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba 3.5: Update vendor to version 3.5.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/lib/util_str.c

    r594 r597  
    587587 zero. Strips out all but 'a-Z0-9' and the character in other_safe_chars
    588588 and replaces with '_'. Deliberately does *NOT* check for multibyte
    589  characters. Don't change it !
     589 characters. Treats src as an array of bytes, not as a multibyte
     590 string. Any byte >0x7f is automatically converted to '_'.
     591 other_safe_chars must also contain an ascii string (bytes<0x7f).
    590592**/
    591593
     
    623625        for(i = 0; i < len; i++) {
    624626                int val = (src[i] & 0xff);
    625                 if (isupper_ascii(val) || islower_ascii(val) ||
    626                                 isdigit(val) || strchr_m(other_safe_chars, val))
     627                if (val > 0x7f) {
     628                        dest[i] = '_';
     629                        continue;
     630                }
     631                if (isupper(val) || islower(val) ||
     632                                isdigit(val) || strchr(other_safe_chars, val))
    627633                        dest[i] = src[i];
    628634                else
Note: See TracChangeset for help on using the changeset viewer.