Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #364

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
* Add -fline-refs to avoid being unfriendly to version control systems.
* Default constraint checking fix.
Thanks to Bartosz Marcinkiewicz <[email protected]>
* Get rid of non-standard pointer arithmetics on void* pointer.
* Get rid of non-standard pointer arithmetic on void* pointer.
* PER-encoding of integers wider than 32 bits.

0.9.24: 2013-Mar-16
Expand Down Expand Up @@ -315,7 +315,7 @@
* Added ASN1C_ENVIRONMENT_VERSION and get_asn1c_environment_version().
* Fixed ANY type decoding (Severity: high; Security impact: low).
* Fixed BER decoder restartability problem with certain primitive
types (BOOLEAN, INTEGER, and REAL). The problem occured when the
types (BOOLEAN, INTEGER, and REAL). The problem occurred when the
encoding of such type is split between several bytes.
(Severity: high; Security impact: low)
* Support for cross-referencing type definitions (updated ./tests/43-*).
Expand All @@ -332,7 +332,7 @@
the "Spouse" case in A.3.
(Severity: medium; Security impact: low)
* Added converters between any generic type and the ANY type.
* Parser fixed: Information Object Class fields may be taged.
* Parser fixed: Information Object Class fields may be tagged.
* Parser fixed: tagged types inside SEQUENCE OF/SET OF support.
* Improved DEFAULT Value parsing and pretty-printing.
* Condition on distinct tags checker was incorrectly dealing with
Expand Down Expand Up @@ -414,7 +414,7 @@
When encoding data for certain ASN.1 specifications containing
explicit tags, the tag is always written incorrectly due to
incorrect memory reference. The encoding will almost always produce
unparseable data and might well reference unmapped region so program
unparsable data and might well reference unmapped region so program
would produce segmentation violation. Fortunately, memory is
read, not written, so remote exploits cannot execute arbitrary
code and triggering unmapped memory reference is highly unlikely
Expand Down Expand Up @@ -503,7 +503,7 @@
0.8.3: 2004-Mar-14 T-version-0-8-3

* Fixed SET::BER decoder: restart after reaching a buffer boundary
weas broken (Severity: high; Security impact: low).
was broken (Severity: high; Security impact: low).
* Fixed OCTET STRING::BER decoder: restart after reaching a buffer
boundary was broken (Severity: high; Security impact: low).
Reported by <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion asn1-tools/unber/libasn1_unber_tool.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ print_V(const char *fname, input_stream_t *ibs, output_stream_t *os,
* Determine how to print the value, either in its native binary form,
* encoded with &xNN characters, or using pretty-printing.
* The basic string types (including "useful types", like UTCTime)
* are excempt from this determination logic, because their alphabets
* are exempt from this determination logic, because their alphabets
* are subsets of the XML's native UTF-8 encoding.
*/
switch(etype) {
Expand Down
6 changes: 3 additions & 3 deletions doc/docsrc/asn1c-usage.tex
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ \section{The asn1c compiler tool}
current directory. You would probably want to start with \textbf{-P}
option instead of creating a mess in your current directory. Another
option, \textbf{-R}, asks compiler to only generate the files which
need to be generated, and supress linking in the numerous support
need to be generated, and suppress linking in the numerous support
files.

Print the compiled output instead of creating multiple source files:
Expand Down Expand Up @@ -557,7 +557,7 @@ \section{\label{sec:Command-line-options}Command line options}
{\ttfamily -no-gen-PER} & {\small Do not generate the Packed Encoding Rules (PER, X.691) support code.}\\
{\ttfamily -no-gen-example} & {\small Do not generate the ASN.1 format converter example.}\\
{\ttfamily -pdu=\{\textbf{all}|\textbf{auto}|\emph{Type}\}} & {\small Create a PDU table for specified types, or discover the Protocol Data Units automatically.
In case of \texttt{-pdu=\textbf{all}}, all ASN.1 types defined in all modules wil form a PDU table. In case of \texttt{-pdu=\textbf{auto}}, all types not referenced by any other type will form a PDU table. If \texttt{\emph{Type}} is an ASN.1 type identifier, it is added to a PDU table. The last form may be specified multiple times.}\\ \\
In case of \texttt{-pdu=\textbf{all}}, all ASN.1 types defined in all modules will form a PDU table. In case of \texttt{-pdu=\textbf{auto}}, all types not referenced by any other type will form a PDU table. If \texttt{\emph{Type}} is an ASN.1 type identifier, it is added to a PDU table. The last form may be specified multiple times.}\\ \\
\textbf{Output Options} & \textbf{Description}\\
\midrule
{\ttfamily -print-class-matrix} & {\small When \texttt{-EF} options are given, this option instructs the compiler to print out the collected Information Object Class matrix.}\\
Expand All @@ -571,7 +571,7 @@ \section{\label{sec:Command-line-options}Command line options}

\chapter{API reference}

The functions desribed in this chapter are to be used by the application
The functions described in this chapter are to be used by the application
programmer. These functions won't likely change change or get removed until
the next major release.

Expand Down
2 changes: 1 addition & 1 deletion libasn1common/genhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
*
* In the NORMAL mode we use the lower part of the genhash_t structure
* to hold a set of pointers, including a pointer to the hash buckets.
* We agressively expand hash buckets size when adding new elements
* We aggressively expand hash buckets size when adding new elements
* to lower the number of key comparisons.
*/

Expand Down
4 changes: 2 additions & 2 deletions libasn1common/genhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int genhash_iter_init(genhash_iter_t *iter,
* Returns the key and value of each element in optional (key) and (value),
* which must be passed as the pointers to pointers (hence these ***'s).
* OWNERSHIP:
* The key and value are pointers to the internally manageed locations.
* The key and value are pointers to the internally managed locations.
* RETURN VALUES:
* 0 if no more elements will be returned, otherwise 1.
* EXAMPLE:
Expand All @@ -207,7 +207,7 @@ int genhash_iter(genhash_iter_t *iter, void */***/key, void */***/val);
/*
* Dispose of the iterator.
* After this operations, the iterator contents unusable
* and shall not be accesed. (genhash_iter_init() is OK).
* and shall not be accessed. (genhash_iter_init() is OK).
*/
void genhash_iter_done(genhash_iter_t *iter);

Expand Down
2 changes: 1 addition & 1 deletion libasn1compiler/asn1c_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ asn1c_open_file(const char *destdir, const char *name, const char *ext,
if(opt_tmpname) {
*opt_tmpname = strdup(fname);
if(*opt_tmpname) {
/* Successfull */
/* Successful */
} else {
if(created) unlink(fname);
fclose(fp);
Expand Down
2 changes: 1 addition & 1 deletion libasn1fix/asn1fix_crange.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ asn1constraint_compute_OER_range(const char *dbg_name, asn1p_expr_type_e expr_ty
asn1cnst_range_t *
asn1constraint_compute_PER_range(const char *dbg_name, asn1p_expr_type_e expr_type, const asn1p_constraint_t *ct, enum asn1p_constraint_type_e requested_ct_type, const asn1cnst_range_t *minmax, int *exmet, enum cpr_flags cpr_flags) {
if(0) return asn1constraint_compute_constraint_range(dbg_name, expr_type, ct, requested_ct_type, minmax, exmet, cpr_flags | CPR_strict_PER_visibility);
/* Due to pecularities of PER constraint handling, we don't enable strict PER visibility upfront here. */
/* Due to peculiarities of PER constraint handling, we don't enable strict PER visibility upfront here. */
return asn1constraint_compute_constraint_range(dbg_name, expr_type, ct, requested_ct_type, minmax, exmet, cpr_flags);
}

Expand Down
2 changes: 1 addition & 1 deletion libasn1fix/asn1fix_cws.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ _asn1f_parse_class_object_data(arg_t *arg, asn1p_expr_t *eclass,
cell = asn1p_ioc_row_cell_fetch(row,
chunk->content.token);
if(cell == NULL) {
FATAL("Field reference %s found in WITH SYNAX {} clause does not match actual field in Object Class %s",
FATAL("Field reference %s found in WITH SYNTAX {} clause does not match actual field in Object Class %s",
chunk->content.token,
eclass->Identifier, eclass->_lineno);
if(newpos) *newpos = buf;
Expand Down
4 changes: 2 additions & 2 deletions libasn1fix/asn1fix_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ asn1f_printable_value(asn1p_value_t *v) {
int i;
/*
* Compute number of bytes necessary
* to represend the binary value.
* to represent the binary value.
*/
int bits = v->value.binary_vector.size_in_bits;
len = ((bits%8)?bits:(bits >> 2)) + sizeof("''H");
Expand Down Expand Up @@ -251,7 +251,7 @@ asn1f_check_unique_expr(arg_t *arg) {
}

/*
* Check that every preceeding child of the given expr is not
* Check that every preceding child of the given expr is not
* having the name of the given one.
*/
int
Expand Down
2 changes: 1 addition & 1 deletion libasn1fix/asn1fix_misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int asn1f_recurse_expr(arg_t *arg, int (*f)(arg_t *arg));
int asn1f_check_unique_expr(arg_t *arg);

/*
* Check that every preceeding child of the given expr is not
* Check that every preceding child of the given expr is not
* having the name of the given one.
* If opt_compare == NULL, the default comparison of the argument's
* names (identifiers) will be performed.
Expand Down
2 changes: 1 addition & 1 deletion libasn1fix/asn1fix_retrieve.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ asn1p_expr_t *asn1f_find_terminal_type(arg_t *arg, asn1p_expr_t *tc);
* value Type2 ::= value2
* value2 Type3 ::= 3
* Then this function will return the expression for value2 if given
* the v as an argment.
* the v as an argument.
*/
asn1p_expr_t *asn1f_find_terminal_value(arg_t *arg, asn1p_expr_t *tc);

Expand Down
2 changes: 1 addition & 1 deletion libasn1fix/check_fixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ check(const char *fname,
} else if(!expected_parseable) {
fprintf(stderr,
"The file \"%s\" is not expected to be parseable, "
"yet parsing was successfull!\n", fname);
"yet parsing was successful!\n", fname);
r_value = -1;
}
if(!asn) return r_value;
Expand Down
4 changes: 2 additions & 2 deletions libasn1parser/asn1p_integer.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ enum strtox_result_e {
STRTOX_ERROR_RANGE = -3, /* Input outside of supported numeric range */
STRTOX_ERROR_INVAL = -2, /* Invalid data encountered (e.g., "+-") */
STRTOX_EXPECT_MORE = -1, /* More data expected (e.g. "+") */
STRTOX_OK = 0, /* Conversion succeded, number ends at (*end) */
STRTOX_OK = 0, /* Conversion succeeded, number ends at (*end) */
STRTOX_EXTRA_DATA =
1 /* Conversion succeded, but the string has extra stuff */
1 /* Conversion succeeded, but the string has extra stuff */
};

static enum strtox_result_e
Expand Down
2 changes: 1 addition & 1 deletion libasn1parser/asn1p_integer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/*
* Basic integer type used in numerous places.
* ASN.1 does not define any limits on this number, so it must be sufficiently
* large to accomodate typical inputs. It does not have to be a dynamically
* large to accommodate typical inputs. It does not have to be a dynamically
* allocated type with potentially unlimited width: consider the width of
* an integer defined here as one of the "compiler limitations".
* NOTE: this is NOT a type for ASN.1 "INTEGER" type representation, this
Expand Down
2 changes: 1 addition & 1 deletion libasn1parser/asn1p_l.c
Original file line number Diff line number Diff line change
Expand Up @@ -2081,7 +2081,7 @@ static asn1c_integer_t _lex_atoi(const char *ptr);
static double _lex_atod(const char *ptr);

/*
* Check that the type is defined in the year of the standard choosen.
* Check that the type is defined in the year of the standard chosen.
*/
#define TYPE_LIFETIME(fyr, lyr) \
(!asn1p_lexer_types_year \
Expand Down
2 changes: 1 addition & 1 deletion libasn1parser/asn1p_l.l
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static asn1c_integer_t _lex_atoi(const char *ptr);
static double _lex_atod(const char *ptr);

/*
* Check that the type is defined in the year of the standard choosen.
* Check that the type is defined in the year of the standard chosen.
*/
#define TYPE_LIFETIME(fyr, lyr) \
(!asn1p_lexer_types_year \
Expand Down
2 changes: 1 addition & 1 deletion libasn1parser/asn1p_y.y
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ Assignment:
}

/*
* Erroneous attemps
* Erroneous attempts
*/
| BasicString {
return yyerror(
Expand Down
2 changes: 1 addition & 1 deletion skeletons/INTEGER.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ INTEGER_decode_uper(const asn_codec_ctx_t *opt_codec_ctx,
/* #12.2.3 */
if(ct && ct->lower_bound) {
/*
* TODO: replace by in-place arithmetics.
* TODO: replace by in-place arithmetic.
*/
long value = 0;
if(asn_INTEGER2long(st, &value))
Expand Down
4 changes: 2 additions & 2 deletions skeletons/INTEGER.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ enum asn_strtox_result_e {
ASN_STRTOX_ERROR_RANGE = -3, /* Input outside of supported numeric range */
ASN_STRTOX_ERROR_INVAL = -2, /* Invalid data encountered (e.g., "+-") */
ASN_STRTOX_EXPECT_MORE = -1, /* More data expected (e.g. "+") */
ASN_STRTOX_OK = 0, /* Conversion succeded, number ends at (*end) */
ASN_STRTOX_EXTRA_DATA = 1 /* Conversion succeded, but the string has extra stuff */
ASN_STRTOX_OK = 0, /* Conversion succeeded, number ends at (*end) */
ASN_STRTOX_EXTRA_DATA = 1 /* Conversion succeeded, but the string has extra stuff */
};
enum asn_strtox_result_e asn_strtol_lim(const char *str, const char **end,
long *l);
Expand Down
2 changes: 1 addition & 1 deletion skeletons/NativeInteger.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ NativeInteger_decode_ber(const asn_codec_ctx_t *opt_codec_ctx,
/*
* ASN.1 encoded INTEGER: buf_ptr, length
* Fill the native, at the same time checking for overflow.
* If overflow occured, return with RC_FAIL.
* If overflow occurred, return with RC_FAIL.
*/
{
INTEGER_t tmp;
Expand Down
2 changes: 1 addition & 1 deletion skeletons/NativeReal.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ NativeReal_decode_ber(const asn_codec_ctx_t *opt_codec_ctx,
/*
* ASN.1 encoded REAL: buf_ptr, length
* Fill the Dbl, at the same time checking for overflow.
* If overflow occured, return with RC_FAIL.
* If overflow occurred, return with RC_FAIL.
*/
{
uint8_t scratch[24]; /* Longer than %.16f in decimal */
Expand Down
2 changes: 1 addition & 1 deletion skeletons/OCTET_STRING.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
/*
* The main reason why ASN.1 is still alive is that too much time and effort
* is necessary for learning it more or less adequately, thus creating a gut
* necessity to demonstrate that aquired skill everywhere afterwards.
* necessity to demonstrate that acquired skill everywhere afterwards.
* No, I am not going to explain what the following stuff is.
*/
struct _stack_el {
Expand Down
2 changes: 1 addition & 1 deletion skeletons/REAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ssize_t REAL__dump(double d, int canonical, asn_app_consume_bytes_f *cb, void *a
* Convert between native double type and REAL representation (DER).
* RETURN VALUES:
* 0: Value converted successfully
* -1: An error occured while converting the value: invalid format.
* -1: An error occurred while converting the value: invalid format.
*/
int asn_REAL2double(const REAL_t *real_ptr, double *d);
int asn_double2REAL(REAL_t *real_ptr, double d);
Expand Down
2 changes: 1 addition & 1 deletion skeletons/asn_bit_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ asn_bit_data_t *asn_bit_data_new_contiguous(const void *data, size_t size_bits);
*/
int32_t asn_get_few_bits(asn_bit_data_t *, int get_nbits);

/* Undo the immediately preceeding "get_few_bits" operation */
/* Undo the immediately preceding "get_few_bits" operation */
void asn_get_undo(asn_bit_data_t *, int get_nbits);

/*
Expand Down
2 changes: 1 addition & 1 deletion skeletons/ber_tlv_tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ber_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) {
*/
if(val >> ((8 * sizeof(val)) - 9)) {
/*
* We would not be able to accomodate
* We would not be able to accommodate
* any more tag bits.
*/
return -1;
Expand Down
4 changes: 2 additions & 2 deletions skeletons/constr_CHOICE.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
static unsigned _fetch_present_idx(const void *struct_ptr, unsigned off,
unsigned size);
static void _set_present_idx(void *sptr, unsigned offset, unsigned size,
unsigned pres);
unsigned present);
static const void *_get_member_ptr(const asn_TYPE_descriptor_t *,
const void *sptr, asn_TYPE_member_t **elm,
unsigned *present);
Expand Down Expand Up @@ -162,7 +162,7 @@ CHOICE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx,
}

if(ctx->left >= 0) {
/* ?Substracted below! */
/* ?Subtracted below! */
ctx->left += rval.consumed;
}
ADVANCE(rval.consumed);
Expand Down
2 changes: 1 addition & 1 deletion skeletons/constr_CHOICE_oer.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ oer_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) {
*/
if(val >> ((8 * sizeof(val)) - 9)) {
/*
* We would not be able to accomodate
* We would not be able to accommodate
* any more tag bits.
*/
return -1;
Expand Down
2 changes: 1 addition & 1 deletion skeletons/constr_SEQUENCE.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ SEQUENCE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx,
}

if(ctx->left >= 0)
ctx->left += rval.consumed; /* ?Substracted below! */
ctx->left += rval.consumed; /* ?Subtracted below! */
ADVANCE(rval.consumed);

NEXT_PHASE(ctx);
Expand Down
2 changes: 1 addition & 1 deletion skeletons/constr_SEQUENCE_oer.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td,
}

/*
* Before encode extensions, encode extensions additions presense bitmap
* Before encode extensions, encode extensions additions presence bitmap
# X.696 (08/2015) #16.4.
*/
if(has_extensions) {
Expand Down
4 changes: 2 additions & 2 deletions skeletons/constr_SET.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ SET_decode_ber(const asn_codec_ctx_t *opt_codec_ctx,
}

if(ctx->left >= 0)
ctx->left += rval.consumed; /* ?Substracted below! */
ctx->left += rval.consumed; /* ?Subtracted below! */
ADVANCE(rval.consumed);

NEXT_PHASE(ctx);
Expand All @@ -171,7 +171,7 @@ SET_decode_ber(const asn_codec_ctx_t *opt_codec_ctx,
* try to decode the next member from the list of
* this structure's elements.
* Note that elements in BER may arrive out of
* order, yet DER mandates that they shall arive in the
* order, yet DER mandates that they shall arrive in the
* canonical order of their tags. So, there is a room
* for optimization.
*/
Expand Down
2 changes: 1 addition & 1 deletion skeletons/constr_SET_OF.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ SET_OF_decode_ber(const asn_codec_ctx_t *opt_codec_ctx,
}

if(ctx->left >= 0)
ctx->left += rval.consumed; /* ?Substracted below! */
ctx->left += rval.consumed; /* ?Subtracted below! */
ADVANCE(rval.consumed);

ASN_DEBUG("Structure consumes %ld bytes, "
Expand Down
4 changes: 2 additions & 2 deletions skeletons/constr_TYPE.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ typedef struct asn_TYPE_member_s {
typedef struct asn_TYPE_tag2member_s {
ber_tlv_tag_t el_tag; /* Outmost tag of the member */
unsigned el_no; /* Index of the associated member, base 0 */
int toff_first; /* First occurence of the el_tag, relative */
int toff_last; /* Last occurence of the el_tag, relative */
int toff_first; /* First occurrence of the el_tag, relative */
int toff_last; /* Last occurrence of the el_tag, relative */
} asn_TYPE_tag2member_t;

/*
Expand Down
Loading