Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/lib/compression/lzxpress.c

    r414 r740  
    3535#include "replace.h"
    3636#include "lzxpress.h"
     37#include "../lib/util/byteorder.h"
    3738
    3839
     
    8182        uncompressed_pos = 0;
    8283        indic = 0;
     84        *(uint32_t *)compressed = 0;
    8385        compressed_pos = sizeof(uint32_t);
    8486        indic_pos = &compressed[0];
     
    130132                                /* Classical meta-data */
    131133                                metadata = (uint16_t)(((best_offset - 1) << 3) | (best_len - 3));
    132                                 dest[metadata_size / sizeof(uint16_t)] = metadata;
     134                                SSVAL(dest, metadata_size / sizeof(uint16_t), metadata);
    133135                                metadata_size += sizeof(uint16_t);
    134136                        } else {
    135137                                metadata = (uint16_t)(((best_offset - 1) << 3) | 7);
    136                                 dest[metadata_size / sizeof(uint16_t)] = metadata;
     138                                SSVAL(dest, metadata_size / sizeof(uint16_t), metadata);
    137139                                metadata_size = sizeof(uint16_t);
    138140
     
    156158                                        }
    157159
    158                                         /* Additionnal best_len */
     160                                        /* Additional best_len */
    159161                                        compressed[compressed_pos + metadata_size] = (best_len - (3 + 7 + 15)) & 0xFF;
    160162                                        metadata_size += sizeof(uint8_t);
     
    168170                                        }
    169171
    170                                         /* Additionnal best_len */
     172                                        /* Additional best_len */
    171173                                        compressed[compressed_pos + metadata_size] = 255;
    172174
     
    199201
    200202                if ((indic_bit - 1) % 32 > (indic_bit % 32)) {
    201                         *(uint32_t *)indic_pos = indic;
     203                        SIVAL(indic_pos, 0, indic);
    202204                        indic = 0;
    203205                        indic_pos = &compressed[compressed_pos];
     
    213215                compressed_pos++;
    214216                if (((indic_bit - 1) % 32) > (indic_bit % 32)){
    215                         *(uint32_t *)indic_pos = indic;
     217                        SIVAL(indic_pos, 0, indic);
    216218                        indic = 0;
    217219                        indic_pos = &compressed[compressed_pos];
     
    224226                        indic |= 0 << (32 - ((indic_bit % 32) + 1));
    225227
    226                 *(uint32_t *)indic_pos = indic;
     228                *(uint32_t *)&compressed[compressed_pos] = 0;
     229                SIVAL(indic_pos, 0, indic);
    227230                compressed_pos += sizeof(uint32_t);
    228231        }
Note: See TracChangeset for help on using the changeset viewer.