Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
no functional changes
  • Loading branch information
RainRat committed Jan 19, 2024
1 parent 5138039 commit c0ce373
Show file tree
Hide file tree
Showing 40 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ if(Git_FOUND)
endif()
endif()

# Enable use of pkg-config to find depenencies.
# Enable use of pkg-config to find dependencies.
find_package(PkgConfig QUIET)

#
Expand Down
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4420,7 +4420,7 @@ Important note to clamdwatch users: please upgrade to the latest version
- a lot of minor improvements, including support for new platforms

- clamd:
- new directive ExitOnOOM (stop the deamon when libclamav reports an out of
- new directive ExitOnOOM (stop the daemon when libclamav reports an out of
memory condition)
- new directives StreamMinPort and StreamMaxPort (port range specification
for a stream mode)
Expand Down Expand Up @@ -5456,7 +5456,7 @@ compression/archive support. Snapshot will be available for a few days.
- fixed compile problem on FreeBSD (thanks to Wieslaw Glod <[email protected]> and
Ken McKittrick <[email protected]>)
- clamscan reads all .db files from data directory, so you can put your
own databases there and they won't be overwrited by the updaters. viruses.db
own databases there and they won't be overwritten by the updaters. viruses.db
is still the main database file (if --database isn't used).
- --deb (debian binary packages scanning) by Magnus Ekdahl <[email protected]>
- --remove option, but be careful with it !
Expand Down
2 changes: 1 addition & 1 deletion README.Docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ connecting to the dockerized `clamd`. This can be done by either pointing
### Dockerized ClamDScan

Running both `clamd` and `clamdscan` is also easily possible, as all that is
needed is the shared socket between the two containers. The only cavaet here
needed is the shared socket between the two containers. The only caveat here
is to:
1. mount the files to be scanned in the container that will run `clamd`, or
2. mount the files to be scanned in the container that will `clamdscan` run if
Expand Down
2 changes: 1 addition & 1 deletion clamdscan/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ int16_t ping_clamd(const struct optstruct *opts)
}
attempts = cli_strntoul(attempt_str, strlen(attempt_str), &errchk, 10);
if (attempt_str + strlen(attempt_str) > errchk) {
logg(LOGG_WARNING, "attmept_str would go past end of buffer\n");
logg(LOGG_WARNING, "attempt_str would go past end of buffer\n");
ret = -1;
goto done;
}
Expand Down
2 changes: 1 addition & 1 deletion cmake/CheckFmapFeatures.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ endif()
# Check for mmap() support, required for HAVE_MPOOL.
#
# checks for private fixed mappings, we don't need fixed mappings,
# so check only wether private mappings work.
# so check only whether private mappings work.
check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
if(MMAP_FOR_CROSSCOMPILING)
set(HAVE_MMAP 1)
Expand Down
4 changes: 2 additions & 2 deletions common/mac/cert_util_mac.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ static keychain_info_t _get_keychain_info(keychain_type_t keychain_type)
}

/*!
* @brief Get a reference to an allocated array of certifcates contained
* @brief Get a reference to an allocated array of certificates contained
* in the specified keychain.
* @param[in] keychain_type Keychain type
* @return If successful, reference to allocated array of certifcates. The
* @return If successful, reference to allocated array of certificates. The
* caller is responsible for calling CFRelease on the returned
* reference after use.
* @return NULL otherwise
Expand Down
2 changes: 1 addition & 1 deletion libclamav/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ set(LIBCLAMAV_SOURCES
egg.c egg.h
# Master Boot Record partition
mbr.c mbr.h
# GUID Parition Table partition
# GUID Partition Table partition
gpt.c gpt.h
# Apple Partition Map partition
apm.c apm.h
Expand Down
4 changes: 2 additions & 2 deletions libclamav/autoit.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ static unsigned int u2a(uint8_t *dest, unsigned int len)
}

/*********************
MT realted stuff
MT related stuff
*********************/

struct MT {
Expand Down Expand Up @@ -935,7 +935,7 @@ static cl_error_t ea05(cli_ctx *ctx, const uint8_t *base, char *tmpd)
}

/*********************
LAME realted stuff
LAME related stuff
*********************/

#define ROFL(a, b) ((a << (b % (sizeof(a) << 3))) | (a >> ((sizeof(a) << 3) - (b % (sizeof(a) << 3)))))
Expand Down
2 changes: 1 addition & 1 deletion libclamav/bytecode_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct stack {
};

/* type with largest alignment that we use (in general it is a long double, but
* thats too big alignment for us) */
* that's too big alignment for us) */
typedef uint64_t align_t;

static always_inline void *cli_stack_alloc(struct stack *stack, unsigned bytes)
Expand Down
2 changes: 1 addition & 1 deletion libclamav/c++/bytecode2llvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1973,7 +1973,7 @@ static void *bytecode_watchdog(void *arg)
} while (1);
watchdog_running = 0;
if (cli_debug_flag)
cli_dbgmsg_no_inline("bytecode watchdog quiting\n");
cli_dbgmsg_no_inline("bytecode watchdog quitting\n");
pthread_mutex_unlock(&watchdog_mutex);
return NULL;
}
Expand Down
2 changes: 1 addition & 1 deletion libclamav/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ static inline void cacheset_destroy(struct cache_set *cs, mpool_t *mempool)
cs->data = NULL;
}

/* The left/right cooser for the splay tree */
/* The left/right chooser for the splay tree */
static inline int cmp(int64_t *a, ssize_t sa, int64_t *b, ssize_t sb)
{
if (a[1] < b[1]) return -1;
Expand Down
4 changes: 2 additions & 2 deletions libclamav/egg.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ static cl_error_t egg_parse_encrypt_header(const uint8_t* index, size_t size, eg
* The EGG specification (last updated 2016) for the encrypt header is not accurate.
* The following describes my findings of the actual format for the encrypt header.
*
* The significant discrepancy is that the Size includes the size of the header iself, not just the data following it.
* The significant discrepancy is that the Size includes the size of the header itself, not just the data following it.
* No other extra_field header's size field includes the size of itself.
* This must be accounted for by the caller of this function (see the "Fudge factor" comments where this function is used).
*
Expand Down Expand Up @@ -1702,7 +1702,7 @@ cl_error_t cli_egg_open(fmap_t* map, void** hArchive, char*** comments, uint32_t
*/
if (handle->nFiles == 0) {
cli_dbgmsg("cli_egg_open: No file found for block in non-solid archive.\n");
// TODO: create an unamed block.
// TODO: create an unnamed block.
egg_free_egg_block(found_block);
} else {
eggFile = handle->files[handle->nFiles - 1];
Expand Down
2 changes: 1 addition & 1 deletion libclamav/entconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ cl_error_t cli_codepage_to_utf8(char* in, size_t in_size, uint16_t codepage, cha

conv = iconv_open("UTF-8//TRANSLIT", encoding);
if (conv == (iconv_t)-1) {
// Try again w/out the //TRANSLIT, required because musl doesn't supprot it.
// Try again w/out the //TRANSLIT, required because musl doesn't support it.
// See: https://github.com/akrennmair/newsbeuter/issues/364#issuecomment-250208235
conv = iconv_open("UTF-8", encoding);
if (conv == (iconv_t)-1) {
Expand Down
2 changes: 1 addition & 1 deletion libclamav/hwp.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ cl_error_t cli_scanhwp5_stream(cli_ctx *ctx, hwp5_header_t *hwp5, char *name, in

/*** HWP3 ***/

/* all fields use little endian and unicode encoding, if appliable */
/* all fields use little endian and unicode encoding, if applicable */

// File Identification Information - (30 total bytes)
#define HWP3_IDENTITY_INFO_SIZE 30
Expand Down
2 changes: 1 addition & 1 deletion libclamav/jsparse/js-norm.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static struct scope *scope_done(struct scope *s)
* InsideInitializer acts differently, make it only a flag
* ....................
*
* Pushing, Poping is done when entering / exiting function scopes,
* Pushing, Popping is done when entering / exiting function scopes,
* tracking { and function ( is done by the function scope tracker too.
*
* we only need to track brackets.
Expand Down
4 changes: 2 additions & 2 deletions libclamav/matcher-ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static int sort_list_fn(const void *a, const void *b)
RETURN_RES_IF_NE(patt_a->partno, patt_b->partno);

/* 4. Keep close patterns close
* (this is for performace) */
* (this is for performance) */
RETURN_RES_IF_NE(patt_a, patt_b);

return 0;
Expand Down Expand Up @@ -242,7 +242,7 @@ static int sort_heads_by_partno_fn(const void *a, const void *b)
}

/* 3. Keep close patterns close
* (this is for performace) */
* (this is for performance) */
RETURN_RES_IF_NE(patt_a, patt_b);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion libclamav/matcher-byte-comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ uint16_t cli_bcomp_chk_hex(const unsigned char *buffer, uint16_t opt, uint32_t l
}

/**
* @brief multipurpose buffer normalization support function for bytcompare
* @brief multipurpose buffer normalization support function for bytecompare
*
* Currently can be used to normalize a little endian hex buffer to big endian.
* Can also be used to trim whitespace from the front of the buffer.
Expand Down
4 changes: 2 additions & 2 deletions libclamav/mbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -2047,7 +2047,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re
inMimeHead = false;

if (strlen(line) > RFC2821LENGTH) {
cli_dbgmsg("parseEmailBody: line length exceds RFC2821 maximum length (1000)\n");
cli_dbgmsg("parseEmailBody: line length exceeds RFC2821 maximum length (1000)\n");
// We must skip this line because functions like rfc822comments() may accept output buffers
// that [RFC2821LENGTH + 1] in and don't have any length checks to prevent exceeding that max.
// E.g. See `boundaryStart()`.
Expand Down Expand Up @@ -2408,7 +2408,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re
}
break;
default:
cli_dbgmsg("Unepxected mime sub type\n");
cli_dbgmsg("Unexpected mime sub type\n");
rc = CL_EFORMAT;
break;
}
Expand Down
10 changes: 5 additions & 5 deletions libclamav/scanners.c
Original file line number Diff line number Diff line change
Expand Up @@ -3320,7 +3320,7 @@ static cl_error_t scanraw(cli_ctx *ctx, cli_file_t type, uint8_t typercg, cli_fi
ret = cli_scan_fmap(ctx, type == CL_TYPE_TEXT_ASCII ? CL_TYPE_ANY : type, false, &ftoffset, acmode, NULL, refhash);
perf_stop(ctx, PERFT_RAW);

// In allmatch-mode, ret will never be CL_VIRUS, so ret may be used exlusively for file type detection and for terminal errors.
// In allmatch-mode, ret will never be CL_VIRUS, so ret may be used exclusively for file type detection and for terminal errors.
// When not in allmatch-mode, it's more important to return right away if ret is CL_VIRUS, so we don't care if file type matches were found.
if (ret >= CL_TYPENO) {
// Matched 1+ file type signatures. Handle them.
Expand Down Expand Up @@ -4272,7 +4272,7 @@ cl_error_t cli_magic_scan(cli_ctx *ctx, cli_file_t type)
}

if (ctx->fmap->len <= 5) {
cli_dbgmsg("cli_magic_scan: File is too too small (%zu bytes), ignoring.\n", ctx->fmap->len);
cli_dbgmsg("cli_magic_scan: File is too small (%zu bytes), ignoring.\n", ctx->fmap->len);
ret = CL_CLEAN;
goto early_ret;
}
Expand Down Expand Up @@ -5360,7 +5360,7 @@ static cl_error_t scan_common(cl_fmap_t *map, const char *filepath, const char *

cli_ctx ctx = {0};

bool logg_initalized = false;
bool logg_initialized = false;

char *target_basename = NULL;
char *new_temp_prefix = NULL;
Expand Down Expand Up @@ -5492,7 +5492,7 @@ static cl_error_t scan_common(cl_fmap_t *map, const char *filepath, const char *
}

cli_logg_setup(&ctx);
logg_initalized = true;
logg_initialized = true;

status = cli_magic_scan(&ctx, CL_TYPE_ANY);

Expand Down Expand Up @@ -5653,7 +5653,7 @@ static cl_error_t scan_common(cl_fmap_t *map, const char *filepath, const char *
// And to convert CL_VERIFIED -> CL_CLEAN
(void)result_should_goto_done(&ctx, status, &status);

if (logg_initalized) {
if (logg_initialized) {
cli_logg_unsetup();
}

Expand Down
4 changes: 2 additions & 2 deletions libclamav/udf.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ static PrimaryVolumeDescriptor *getPrimaryVolumeDescriptor(cli_ctx *ctx, size_t
}

/* Skip past all the empty descriptors and find the ImplementationUseVolumeDescriptor.
* Return error if the next non-empty descriptor is not a ImplementationUseVolumeDescriptor. */
* Return error if the next non-empty descriptor is not an ImplementationUseVolumeDescriptor. */
static ImplementationUseVolumeDescriptor *getImplementationUseVolumeDescriptor(cli_ctx *ctx, size_t *idxp, size_t *lastOffsetp)
{
uint8_t *buffer = NULL;
Expand Down Expand Up @@ -534,7 +534,7 @@ static LogicalVolumeIntegrityDescriptor *getLogicalVolumeIntegrityDescriptor(cli
}

/* Skip past all the empty descriptors and find the AnchorVolumeDescriptor.
* Return error if the next non-empty descriptor is not a AnchorVolumeDescriptor. */
* Return error if the next non-empty descriptor is not an AnchorVolumeDescriptor. */
static AnchorVolumeDescriptorPointer *getAnchorVolumeDescriptorPointer(cli_ctx *ctx, size_t *idxp, size_t *lastOffsetp)
{
uint8_t *buffer = NULL;
Expand Down
8 changes: 4 additions & 4 deletions libclamav/unzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static cl_error_t unz(
break;
}
if (cli_writen(out_file, obuf, sizeof(obuf) - (*avail_out)) != (size_t)(sizeof(obuf) - (*avail_out))) {
cli_warnmsg("cli_unzip: falied to write %lu inflated bytes\n", (unsigned long int)sizeof(obuf) - (*avail_out));
cli_warnmsg("cli_unzip: failed to write %lu inflated bytes\n", (unsigned long int)sizeof(obuf) - (*avail_out));
ret = CL_EWRITE;
res = 100;
break;
Expand Down Expand Up @@ -269,7 +269,7 @@ static cl_error_t unz(
break;
}
if (cli_writen(out_file, obuf, sizeof(obuf) - strm.avail_out) != (size_t)(sizeof(obuf) - strm.avail_out)) {
cli_warnmsg("cli_unzip: falied to write %lu bunzipped bytes\n", (long unsigned int)sizeof(obuf) - strm.avail_out);
cli_warnmsg("cli_unzip: failed to write %lu bunzipped bytes\n", (long unsigned int)sizeof(obuf) - strm.avail_out);
ret = CL_EWRITE;
res = 100;
break;
Expand Down Expand Up @@ -305,7 +305,7 @@ static cl_error_t unz(
break;
}
if (cli_writen(out_file, obuf, sizeof(obuf) - strm.avail_out) != (size_t)(sizeof(obuf) - strm.avail_out)) {
cli_warnmsg("cli_unzip: falied to write %lu exploded bytes\n", (unsigned long int)sizeof(obuf) - strm.avail_out);
cli_warnmsg("cli_unzip: failed to write %lu exploded bytes\n", (unsigned long int)sizeof(obuf) - strm.avail_out);
ret = CL_EWRITE;
res = 100;
break;
Expand Down Expand Up @@ -1012,7 +1012,7 @@ cl_error_t index_the_central_directory(
coff = parse_central_directory_file_header(map,
coff,
fsize,
NULL, // num_files_unziped not required
NULL, // num_files_unzipped not required
index + 1,
&ret,
ctx,
Expand Down
4 changes: 2 additions & 2 deletions libclamav_rust/src/cdiff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ pub enum InputError {
#[error("not unicode")]
LineNotUnicode(#[from] std::str::Utf8Error),

/// Errors encountered while excuting a command
/// Errors encountered while executing a command
#[error("processing: {0}")]
Processing(#[from] ProcessingError),

Expand Down Expand Up @@ -532,7 +532,7 @@ pub fn script2cdiff(script_file_name: &str, builder: &str, server: &str) -> Resu
cdiff_file_len, cdiff_file_name
);

// Calculate SHA2-256 to get the sigature
// Calculate SHA2-256 to get the signature
// TODO: Do this while the file is being written
let bytes = std::fs::read(&cdiff_file_name)
.map_err(|e| Error::FileRead(cdiff_file_name.to_owned(), e))?;
Expand Down
4 changes: 2 additions & 2 deletions libclamav_rust/src/css_image_extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub enum Error {
#[error("Invalid parameter: {0}")]
InvalidParameter(String),

#[error("{0} parmeter is NULL")]
#[error("{0} parameter is NULL")]
NullParam(&'static str),

#[error("Failed to decode base64: {0}")]
Expand Down Expand Up @@ -182,7 +182,7 @@ impl<'a> CssImageExtractor<'a> {

// Check for embedded image data for the "url"
if !url_parameter.starts_with("data:") {
// It's not embeded image data, let's move along.
// It's not embedded image data, let's move along.
continue 'outer;
}

Expand Down
2 changes: 1 addition & 1 deletion libclamav_rust/src/evidence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub enum Error {
#[error("Invalid parameter: {0}")]
InvalidParameter(String),

#[error("{0} parmeter is NULL")]
#[error("{0} parameter is NULL")]
NullParam(&'static str),
}

Expand Down
2 changes: 1 addition & 1 deletion libclamav_rust/src/fmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub enum Error {
#[error("Invalid parameter: {0}")]
InvalidParameter(String),

#[error("{0} parmeter is NULL")]
#[error("{0} parameter is NULL")]
NullParam(&'static str),

#[error("Offset {0} and length {1} not contained in FMap of size {2}")]
Expand Down
4 changes: 2 additions & 2 deletions libclamav_rust/src/fuzzy_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ pub enum Error {
#[error("Invalid parameter: {0}")]
InvalidParameter(String),

#[error("{0} parmeter is NULL")]
#[error("{0} parameter is NULL")]
NullParam(&'static str),

#[error("{0} hash must be {1} characters in length")]
Expand Down Expand Up @@ -371,7 +371,7 @@ impl FuzzyHashMap {
/// (i.e., axis=-1).
///
/// For the Python `imagehash` package:
/// - The `phash_simple()` function is doing a DCT-2 transform on a 2-dimensionals
/// - The `phash_simple()` function is doing a DCT-2 transform on a 2-dimensional
/// 32x32 array which means, just on the 2nd axis (just the rows).
/// - The `phash()` function is doing a 2D DCT-2 transform, by running the DCT-2 on
/// both X and Y axis, which is the same as transposing before or after each
Expand Down
4 changes: 2 additions & 2 deletions libclammspack/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@

* Makefile.am, src: move the "useful" programs in src/ to examples/
and don't auto-install them. Even though they're useful, they are
intended as examples and aren't productised (no commmand-line
intended as examples and aren't productised (no command-line
options, no man pages, etc.) -- if you disagree, feel free to
send in a patch

Expand Down Expand Up @@ -571,7 +571,7 @@

* Makefile.am: changed CFLAGS from "-Wsign-compare -Wconversion
-pedantic" to "-W -Wno-unused". This enables more warnings, and
disables these specific warnings which are now a hinderance.
disables these specific warnings which are now a hindrance.

2011-04-27: Stuart Caie <[email protected]>

Expand Down
Loading

0 comments on commit c0ce373

Please sign in to comment.