Exploit databaseDownload repository ZIP
GH-557a35ec88cecc5153df8ffeda95d1c2
bob11vrdp/cve-2022-39425
Sources for CVE-2022-39425
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files60
bob11vrdp/cve-2022-39425Revision 1d03f54cf1ec
- ↑..Parent directory
- backward_references.c
- backward_references.h
- backward_references_hq.c
- backward_references_hq.h
- backward_references_inc.h
- bit_cost.c
- bit_cost.h
- bit_cost_inc.h
- block_encoder_inc.h
- block_splitter.c
- block_splitter.h
- block_splitter_inc.h
- brotli_bit_stream.c
- brotli_bit_stream.h
- cluster.c
- cluster.h
- cluster_inc.h
- command.h
- compress_fragment.c
- compress_fragment.h
- compress_fragment_two_pass.c
- compress_fragment_two_pass.h
- dictionary_hash.c
- dictionary_hash.h
- encode.c
- encoder_dict.c
- encoder_dict.h
- entropy_encode.c
- entropy_encode.h
- entropy_encode_static.h
- fast_log.h
- find_match_length.h
- hash.h
- hash_composite_inc.h
- hash_forgetful_chain_inc.h
- hash_longest_match64_inc.h
- hash_longest_match_inc.h
- hash_longest_match_quickly_inc.h
- hash_rolling_inc.h
- hash_to_binary_tree_inc.h
- histogram.c
- histogram.h
- histogram_inc.h
- literal_cost.c
- literal_cost.h
- memory.c
- memory.h
- metablock.c
- metablock.h
- metablock_inc.h
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
VirtualBox-6.1.38/src/VBox/Devices/EFI/Firmware/BaseTools/Source/C/BrotliCompress/enc/find_match_length.h
Text · 2,538 bytes/* Copyright 2010 Google Inc. All Rights Reserved.
Distributed under MIT license.
See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/
/* Function to find maximal matching prefixes of strings. */
#ifndef BROTLI_ENC_FIND_MATCH_LENGTH_H_
#define BROTLI_ENC_FIND_MATCH_LENGTH_H_
#include "../common/platform.h"
#include <brotli/types.h>
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
/* Separate implementation for little-endian 64-bit targets, for speed. */
#if defined(__GNUC__) && defined(_LP64) && defined(BROTLI_LITTLE_ENDIAN)
static BROTLI_INLINE size_t FindMatchLengthWithLimit(const uint8_t* s1,
const uint8_t* s2,
size_t limit) {
size_t matched = 0;
size_t limit2 = (limit >> 3) + 1; /* + 1 is for pre-decrement in while */
while (BROTLI_PREDICT_TRUE(--limit2)) {
if (BROTLI_PREDICT_FALSE(BROTLI_UNALIGNED_LOAD64LE(s2) ==
BROTLI_UNALIGNED_LOAD64LE(s1 + matched))) {
s2 += 8;
matched += 8;
} else {
uint64_t x = BROTLI_UNALIGNED_LOAD64LE(s2) ^
BROTLI_UNALIGNED_LOAD64LE(s1 + matched);
size_t matching_bits = (size_t)__builtin_ctzll(x);
matched += matching_bits >> 3;
return matched;
}
}
limit = (limit & 7) + 1; /* + 1 is for pre-decrement in while */
while (--limit) {
if (BROTLI_PREDICT_TRUE(s1[matched] == *s2)) {
++s2;
++matched;
} else {
return matched;
}
}
return matched;
}
#else
static BROTLI_INLINE size_t FindMatchLengthWithLimit(const uint8_t* s1,
const uint8_t* s2,
size_t limit) {
size_t matched = 0;
const uint8_t* s2_limit = s2 + limit;
const uint8_t* s2_ptr = s2;
/* Find out how long the match is. We loop over the data 32 bits at a
time until we find a 32-bit block that doesn't match; then we find
the first non-matching bit and use that to calculate the total
length of the match. */
while (s2_ptr <= s2_limit - 4 &&
BrotliUnalignedRead32(s2_ptr) ==
BrotliUnalignedRead32(s1 + matched)) {
s2_ptr += 4;
matched += 4;
}
while ((s2_ptr < s2_limit) && (s1[matched] == *s2_ptr)) {
++s2_ptr;
++matched;
}
return matched;
}
#endif
#if defined(__cplusplus) || defined(c_plusplus)
} /* extern "C" */
#endif
#endif /* BROTLI_ENC_FIND_MATCH_LENGTH_H_ */