mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
Rename gif's "too much pixel data"
This commit is contained in:
1 parent
d7f434c6e4
commit
8b41881ba7
4 files changed
+6
-10
No files matched your search
@@ -42,6 +42,7 @@ var Statuses = [...]string{
|
|||||||
`"?initialize not called"`,
|
`"?initialize not called"`,
|
||||||
`"?interleaved coroutine calls"`,
|
`"?interleaved coroutine calls"`,
|
||||||
`"?not enough data"`,
|
`"?not enough data"`,
|
||||||
|
`"?too much data"`,
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: a collection of forbidden variable names like and, or, not, as, ref,
|
// TODO: a collection of forbidden variable names like and, or, not, as, ref,
|
||||||
|
|||||||
@@ -186,6 +186,7 @@ extern const char* wuffs_base__error__initialize_falsely_claimed_already_zeroed;
|
|||||||
extern const char* wuffs_base__error__initialize_not_called;
|
extern const char* wuffs_base__error__initialize_not_called;
|
||||||
extern const char* wuffs_base__error__interleaved_coroutine_calls;
|
extern const char* wuffs_base__error__interleaved_coroutine_calls;
|
||||||
extern const char* wuffs_base__error__not_enough_data;
|
extern const char* wuffs_base__error__not_enough_data;
|
||||||
|
extern const char* wuffs_base__error__too_much_data;
|
||||||
|
|
||||||
static inline bool //
|
static inline bool //
|
||||||
wuffs_base__status__is_complete(wuffs_base__status z) {
|
wuffs_base__status__is_complete(wuffs_base__status z) {
|
||||||
@@ -3195,8 +3196,6 @@ extern const char* wuffs_gif__error__bad_extension_label;
|
|||||||
extern const char* wuffs_gif__error__bad_graphic_control;
|
extern const char* wuffs_gif__error__bad_graphic_control;
|
||||||
extern const char* wuffs_gif__error__bad_header;
|
extern const char* wuffs_gif__error__bad_header;
|
||||||
extern const char* wuffs_gif__error__bad_literal_width;
|
extern const char* wuffs_gif__error__bad_literal_width;
|
||||||
extern const char* wuffs_gif__error__not_enough_pixel_data;
|
|
||||||
extern const char* wuffs_gif__error__too_much_pixel_data;
|
|
||||||
|
|
||||||
// ---------------- Public Consts
|
// ---------------- Public Consts
|
||||||
|
|
||||||
@@ -4808,6 +4807,7 @@ const char* wuffs_base__error__initialize_not_called =
|
|||||||
const char* wuffs_base__error__interleaved_coroutine_calls =
|
const char* wuffs_base__error__interleaved_coroutine_calls =
|
||||||
"?base: interleaved coroutine calls";
|
"?base: interleaved coroutine calls";
|
||||||
const char* wuffs_base__error__not_enough_data = "?base: not enough data";
|
const char* wuffs_base__error__not_enough_data = "?base: not enough data";
|
||||||
|
const char* wuffs_base__error__too_much_data = "?base: too much data";
|
||||||
|
|
||||||
// ---------------- Images
|
// ---------------- Images
|
||||||
|
|
||||||
@@ -8583,9 +8583,6 @@ const char* wuffs_gif__error__bad_extension_label = "?gif: bad extension label";
|
|||||||
const char* wuffs_gif__error__bad_graphic_control = "?gif: bad graphic control";
|
const char* wuffs_gif__error__bad_graphic_control = "?gif: bad graphic control";
|
||||||
const char* wuffs_gif__error__bad_header = "?gif: bad header";
|
const char* wuffs_gif__error__bad_header = "?gif: bad header";
|
||||||
const char* wuffs_gif__error__bad_literal_width = "?gif: bad literal width";
|
const char* wuffs_gif__error__bad_literal_width = "?gif: bad literal width";
|
||||||
const char* wuffs_gif__error__not_enough_pixel_data =
|
|
||||||
"?gif: not enough pixel data";
|
|
||||||
const char* wuffs_gif__error__too_much_pixel_data = "?gif: too much pixel data";
|
|
||||||
const char* wuffs_gif__error__internal_error_inconsistent_ri_wi =
|
const char* wuffs_gif__error__internal_error_inconsistent_ri_wi =
|
||||||
"?gif: internal error: inconsistent ri/wi";
|
"?gif: internal error: inconsistent ri/wi";
|
||||||
|
|
||||||
@@ -10748,7 +10745,7 @@ label_0_continue:;
|
|||||||
while (v_src_ri < ((uint64_t)(a_src.len))) {
|
while (v_src_ri < ((uint64_t)(a_src.len))) {
|
||||||
v_src = wuffs_base__slice_u8__subslice_i(a_src, v_src_ri);
|
v_src = wuffs_base__slice_u8__subslice_i(a_src, v_src_ri);
|
||||||
if (self->private_impl.f_dst_y >= self->private_impl.f_frame_rect_y1) {
|
if (self->private_impl.f_dst_y >= self->private_impl.f_frame_rect_y1) {
|
||||||
return wuffs_gif__error__too_much_pixel_data;
|
return wuffs_base__error__too_much_data;
|
||||||
}
|
}
|
||||||
v_dst = wuffs_base__table_u8__row(v_tab, self->private_impl.f_dst_y);
|
v_dst = wuffs_base__table_u8__row(v_tab, self->private_impl.f_dst_y);
|
||||||
v_i = (((uint64_t)(self->private_impl.f_dst_x)) *
|
v_i = (((uint64_t)(self->private_impl.f_dst_x)) *
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ pub status "?bad extension label"
|
|||||||
pub status "?bad graphic control"
|
pub status "?bad graphic control"
|
||||||
pub status "?bad header"
|
pub status "?bad header"
|
||||||
pub status "?bad literal width"
|
pub status "?bad literal width"
|
||||||
pub status "?not enough pixel data"
|
|
||||||
pub status "?too much pixel data"
|
|
||||||
|
|
||||||
pri status "?internal error: inconsistent ri/wi"
|
pri status "?internal error: inconsistent ri/wi"
|
||||||
|
|
||||||
@@ -797,7 +795,7 @@ pri func decoder.copy_to_image_buffer!(pb ptr base.pixel_buffer, src slice base.
|
|||||||
src = args.src[src_ri:]
|
src = args.src[src_ri:]
|
||||||
|
|
||||||
if this.dst_y >= this.frame_rect_y1 {
|
if this.dst_y >= this.frame_rect_y1 {
|
||||||
return "?too much pixel data"
|
return base."?too much data"
|
||||||
}
|
}
|
||||||
|
|
||||||
// First, copy from src to that part of the frame rect that is inside
|
// First, copy from src to that part of the frame rect that is inside
|
||||||
|
|||||||
+1
-1
@@ -1058,7 +1058,7 @@ const char* test_wuffs_gif_decode_too_much_data() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return do_test_wuffs_gif_decode_expecting(
|
return do_test_wuffs_gif_decode_expecting(
|
||||||
src, wuffs_gif__error__too_much_pixel_data, true);
|
src, wuffs_base__error__too_much_data, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* test_wuffs_gif_frame_dirty_rect() {
|
const char* test_wuffs_gif_frame_dirty_rect() {
|
||||||
|
|||||||
Reference in new issue
Block a user