mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 16:52:18 +01:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7f70dda95c | ||
|
|
0d8b52336e |
No files matched your search
@@ -14,9 +14,8 @@ archive containing 1 file) as [Farbfeld](https://tools.suckless.org/farbfeld/)
|
|||||||
or [NIE](./nie-spec.md) is to image files: an uncompressed, "designed for Unix
|
or [NIE](./nie-spec.md) is to image files: an uncompressed, "designed for Unix
|
||||||
pipes" format that is trivial to read or write in a few hundred lines of code,
|
pipes" format that is trivial to read or write in a few hundred lines of code,
|
||||||
ideally in a memory-safe programming language. It's a format for what the
|
ideally in a memory-safe programming language. It's a format for what the
|
||||||
Chromium web browser's
|
Chromium web browser's "Rule of 2" security advice calls
|
||||||
[https://chromium.googlesource.com/chromium/src/+/master/docs/security/rule-of-2.md](Rule of 2)
|
[Normalization](https://chromium.googlesource.com/chromium/src/+/master/docs/security/rule-of-2.md#normalization).
|
||||||
security advice calls Normalization.
|
|
||||||
|
|
||||||
|
|
||||||
## Subset of TAR
|
## Subset of TAR
|
||||||
|
|||||||
+25
-26
@@ -71,15 +71,15 @@ extern "C" {
|
|||||||
// each major.minor branch, the commit count should increase monotonically.
|
// each major.minor branch, the commit count should increase monotonically.
|
||||||
//
|
//
|
||||||
// WUFFS_VERSION was overridden by "wuffs gen -version" based on revision
|
// WUFFS_VERSION was overridden by "wuffs gen -version" based on revision
|
||||||
// c677bef7fd69e8f336d1f3aa11eda63bcc29672a committed on 2026-10-18.
|
// 0d8b52336e4c5a27d885f62bc8c4be996a024d70 committed on 2026-10-20.
|
||||||
#define WUFFS_VERSION 0x000040000
|
#define WUFFS_VERSION 0x000040000
|
||||||
#define WUFFS_VERSION_MAJOR 0
|
#define WUFFS_VERSION_MAJOR 0
|
||||||
#define WUFFS_VERSION_MINOR 4
|
#define WUFFS_VERSION_MINOR 4
|
||||||
#define WUFFS_VERSION_PATCH 0
|
#define WUFFS_VERSION_PATCH 0
|
||||||
#define WUFFS_VERSION_PRE_RELEASE_LABEL "alpha.11"
|
#define WUFFS_VERSION_PRE_RELEASE_LABEL "alpha.12"
|
||||||
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_COUNT 4041
|
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_COUNT 4048
|
||||||
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_DATE 20261018
|
#define WUFFS_VERSION_BUILD_METADATA_COMMIT_DATE 20261020
|
||||||
#define WUFFS_VERSION_STRING "0.4.0-alpha.11+4041.20261018"
|
#define WUFFS_VERSION_STRING "0.4.0-alpha.12+4048.20261020"
|
||||||
|
|
||||||
// ---------------- Private Implementation Macros Re-definition Check
|
// ---------------- Private Implementation Macros Re-definition Check
|
||||||
|
|
||||||
@@ -21669,14 +21669,12 @@ wuffs_private_impl__high_prec_dec__parse(wuffs_private_impl__high_prec_dec* h,
|
|||||||
uint8_t* q = s.ptr + s.len;
|
uint8_t* q = s.ptr + s.len;
|
||||||
|
|
||||||
if (options & WUFFS_BASE__PARSE_NUMBER_XXX__ALLOW_UNDERSCORES) {
|
if (options & WUFFS_BASE__PARSE_NUMBER_XXX__ALLOW_UNDERSCORES) {
|
||||||
for (;; p++) {
|
for (; (p < q) && (*p == '_'); p++) {
|
||||||
if (p >= q) {
|
|
||||||
return wuffs_base__make_status(wuffs_base__error__bad_argument);
|
|
||||||
} else if (*p != '_') {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (p >= q) {
|
||||||
|
return wuffs_base__make_status(wuffs_base__error__bad_argument);
|
||||||
|
}
|
||||||
|
|
||||||
// Parse sign.
|
// Parse sign.
|
||||||
do {
|
do {
|
||||||
@@ -21689,14 +21687,12 @@ wuffs_private_impl__high_prec_dec__parse(wuffs_private_impl__high_prec_dec* h,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (options & WUFFS_BASE__PARSE_NUMBER_XXX__ALLOW_UNDERSCORES) {
|
if (options & WUFFS_BASE__PARSE_NUMBER_XXX__ALLOW_UNDERSCORES) {
|
||||||
for (;; p++) {
|
for (; (p < q) && (*p == '_'); p++) {
|
||||||
if (p >= q) {
|
|
||||||
return wuffs_base__make_status(wuffs_base__error__bad_argument);
|
|
||||||
} else if (*p != '_') {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (p >= q) {
|
||||||
|
return wuffs_base__make_status(wuffs_base__error__bad_argument);
|
||||||
|
}
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
// Parse digits, up to (and including) a '.', 'E' or 'e'. Examples for each
|
// Parse digits, up to (and including) a '.', 'E' or 'e'. Examples for each
|
||||||
@@ -21748,9 +21744,12 @@ wuffs_private_impl__high_prec_dec__parse(wuffs_private_impl__high_prec_dec* h,
|
|||||||
if (nd < WUFFS_PRIVATE_IMPL__HPD__DIGITS_PRECISION) {
|
if (nd < WUFFS_PRIVATE_IMPL__HPD__DIGITS_PRECISION) {
|
||||||
h->digits[nd++] = (uint8_t)(*p - '0');
|
h->digits[nd++] = (uint8_t)(*p - '0');
|
||||||
dp = (int32_t)nd;
|
dp = (int32_t)nd;
|
||||||
} else if ('0' != *p) {
|
} else {
|
||||||
// Long-tail non-zeroes set the truncated bit.
|
dp++;
|
||||||
h->truncated = true;
|
if ('0' != *p) {
|
||||||
|
// Long-tail non-zeroes set the truncated bit.
|
||||||
|
h->truncated = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if (*p ==
|
} else if (*p ==
|
||||||
((options &
|
((options &
|
||||||
@@ -21809,14 +21808,12 @@ after_sep:
|
|||||||
after_exp:
|
after_exp:
|
||||||
do {
|
do {
|
||||||
if (options & WUFFS_BASE__PARSE_NUMBER_XXX__ALLOW_UNDERSCORES) {
|
if (options & WUFFS_BASE__PARSE_NUMBER_XXX__ALLOW_UNDERSCORES) {
|
||||||
for (;; p++) {
|
for (; (p < q) && (*p == '_'); p++) {
|
||||||
if (p >= q) {
|
|
||||||
return wuffs_base__make_status(wuffs_base__error__bad_argument);
|
|
||||||
} else if (*p != '_') {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (p >= q) {
|
||||||
|
return wuffs_base__make_status(wuffs_base__error__bad_argument);
|
||||||
|
}
|
||||||
|
|
||||||
int32_t exp_sign = +1;
|
int32_t exp_sign = +1;
|
||||||
if (*p == '+') {
|
if (*p == '+') {
|
||||||
@@ -23586,6 +23583,7 @@ wuffs_base__parse_number_u64(wuffs_base__slice_u8 s, uint32_t options) {
|
|||||||
if (p < q) {
|
if (p < q) {
|
||||||
goto hexadecimal;
|
goto hexadecimal;
|
||||||
}
|
}
|
||||||
|
goto fail_bad_argument;
|
||||||
|
|
||||||
} else if ((*p == 'd') || (*p == 'D')) {
|
} else if ((*p == 'd') || (*p == 'D')) {
|
||||||
p++;
|
p++;
|
||||||
@@ -23596,6 +23594,7 @@ wuffs_base__parse_number_u64(wuffs_base__slice_u8 s, uint32_t options) {
|
|||||||
if (p < q) {
|
if (p < q) {
|
||||||
goto decimal;
|
goto decimal;
|
||||||
}
|
}
|
||||||
|
goto fail_bad_argument;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options & WUFFS_BASE__PARSE_NUMBER_XXX__ALLOW_MULTIPLE_LEADING_ZEROES) {
|
if (options & WUFFS_BASE__PARSE_NUMBER_XXX__ALLOW_MULTIPLE_LEADING_ZEROES) {
|
||||||
|
|||||||
Reference in new issue
Block a user