commit
ef9867791b
@ -0,0 +1 @@
|
|||||||
|
SOURCES/stb-beebb24b945efdea3b9bba23affb8eb3ba8982e7.tar.gz
|
@ -0,0 +1 @@
|
|||||||
|
d0196e6258e2a58d18e06f1482743c9ddb5d3cad SOURCES/stb-beebb24b945efdea3b9bba23affb8eb3ba8982e7.tar.gz
|
@ -0,0 +1,27 @@
|
|||||||
|
From 800a684d6d3cae7ed2437a23496d9306c0dfa8dc Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
|
||||||
|
Date: Thu, 19 Oct 2023 16:33:06 +0200
|
||||||
|
Subject: [PATCH] Fix Null pointer dereference because of an uninitialized
|
||||||
|
variable
|
||||||
|
|
||||||
|
Call `stbi__vertical_flip_slices` only if the previous function didn't fail. Fixes #1550
|
||||||
|
---
|
||||||
|
stb_image.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/stb_image.h b/stb_image.h
|
||||||
|
index 49c53d0..de12c06 100644
|
||||||
|
--- a/stb_image.h
|
||||||
|
+++ b/stb_image.h
|
||||||
|
@@ -1446,7 +1446,7 @@ STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int *
|
||||||
|
stbi__start_mem(&s,buffer,len);
|
||||||
|
|
||||||
|
result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp);
|
||||||
|
- if (stbi__vertically_flip_on_load) {
|
||||||
|
+ if (stbi__vertically_flip_on_load && result) {
|
||||||
|
int channels = req_comp ? req_comp : *comp;
|
||||||
|
stbi__vertical_flip_slices( result, *x, *y, *z, channels );
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
@ -0,0 +1,28 @@
|
|||||||
|
From 4a4c1eeb8540c61ceb3456b3277184bc1c63c9be Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
|
||||||
|
Date: Thu, 19 Oct 2023 16:16:34 +0200
|
||||||
|
Subject: [PATCH 1/2] Fix double-free in stbi__load_gif_main_outofmem
|
||||||
|
|
||||||
|
Fixes #1544
|
||||||
|
---
|
||||||
|
stb_image.h | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/stb_image.h b/stb_image.h
|
||||||
|
index aac3653..d3a1f59 100644
|
||||||
|
--- a/stb_image.h
|
||||||
|
+++ b/stb_image.h
|
||||||
|
@@ -6990,6 +6990,10 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y,
|
||||||
|
stride = g.w * g.h * 4;
|
||||||
|
|
||||||
|
if (out) {
|
||||||
|
+ if (stride == 0) {
|
||||||
|
+ void *ret = stbi__load_gif_main_outofmem(&g, out, delays);
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
if (!stbi__mul2sizes_valid(layers, stride)) {
|
||||||
|
void *ret = stbi__load_gif_main_outofmem(&g, out, delays);
|
||||||
|
return ret;
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
@ -0,0 +1,46 @@
|
|||||||
|
From 33c3c202425daea456520f92846b37da6a83e1c0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
|
||||||
|
Date: Thu, 19 Oct 2023 16:29:56 +0200
|
||||||
|
Subject: [PATCH 2/2] Fix possible double-free or memory leak in
|
||||||
|
stbi__load_gif_main
|
||||||
|
|
||||||
|
Fixes #1548
|
||||||
|
---
|
||||||
|
stb_image.h | 14 ++++++++++----
|
||||||
|
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/stb_image.h b/stb_image.h
|
||||||
|
index d3a1f59..df4ff95 100644
|
||||||
|
--- a/stb_image.h
|
||||||
|
+++ b/stb_image.h
|
||||||
|
@@ -6999,8 +6999,11 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y,
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
void *tmp = (stbi_uc*) STBI_REALLOC_SIZED( out, out_size, layers * stride );
|
||||||
|
- if (!tmp)
|
||||||
|
- return stbi__load_gif_main_outofmem(&g, out, delays);
|
||||||
|
+ if (!tmp) {
|
||||||
|
+ void *ret = stbi__load_gif_main_outofmem(&g, out, delays);
|
||||||
|
+ if (delays && *delays) *delays = 0;
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
else {
|
||||||
|
out = (stbi_uc*) tmp;
|
||||||
|
out_size = layers * stride;
|
||||||
|
@@ -7019,8 +7022,11 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y,
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
out = (stbi_uc*)stbi__malloc( layers * stride );
|
||||||
|
- if (!out)
|
||||||
|
- return stbi__load_gif_main_outofmem(&g, out, delays);
|
||||||
|
+ if (!out) {
|
||||||
|
+ void *ret = stbi__load_gif_main_outofmem(&g, out, delays);
|
||||||
|
+ if (delays && *delays) *delays = 0;
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
out_size = layers * stride;
|
||||||
|
if (delays) {
|
||||||
|
*delays = (int*) stbi__malloc( layers * sizeof(int) );
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
@ -0,0 +1,233 @@
|
|||||||
|
From 3d401e71452d890eaf0bc50b11788cb08a6c2fed Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||||
|
Date: Tue, 17 Aug 2021 21:30:44 -0400
|
||||||
|
Subject: [PATCH] =?UTF-8?q?Fix=20undefined=20behavior=20from=20array=20?=
|
||||||
|
=?UTF-8?q?=E2=80=9Cshape-punning=E2=80=9D?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
In stb_voxel_render.h, there were three cases where a 2D array of
|
||||||
|
dimension [X][Y] was iterated as a 1D array of dimension [1][X*Y]. While
|
||||||
|
this is clever and is correct in terms of the actual memory layout, a
|
||||||
|
second index outside the corresponding dimension ([i][j], j >= Y])
|
||||||
|
actually produces undefined behavior and gives the compiler freedom to
|
||||||
|
do all sorts of terrible things.
|
||||||
|
|
||||||
|
The same thing happens in stb_tilemap_editor.h,
|
||||||
|
tests/caveview/cave_mesher.c, and tests/resample_test.cpp.
|
||||||
|
|
||||||
|
Prior to this commit, a compiler warning regarding the undefined
|
||||||
|
behavior appears on gcc 11.2.1 for at least some of these cases when the
|
||||||
|
tests are compiled with -Waggressive-loop-optimizations (included in
|
||||||
|
-Wall).
|
||||||
|
|
||||||
|
This commit fixes the undefined behavior by iterating these 2D arrays
|
||||||
|
with the conventional nested loops.
|
||||||
|
---
|
||||||
|
stb_tilemap_editor.h | 35 +++++++++++++++++++----------------
|
||||||
|
stb_voxel_render.h | 36 +++++++++++++++++++++---------------
|
||||||
|
tests/caveview/cave_mesher.c | 26 ++++++++++++++------------
|
||||||
|
tests/resample_test.cpp | 15 +++++++++------
|
||||||
|
4 files changed, 63 insertions(+), 49 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/stb_tilemap_editor.h b/stb_tilemap_editor.h
|
||||||
|
index fbd3388084..0b8c2ca997 100644
|
||||||
|
--- a/stb_tilemap_editor.h
|
||||||
|
+++ b/stb_tilemap_editor.h
|
||||||
|
@@ -1066,14 +1066,15 @@ stbte_tilemap *stbte_create_map(int map_x, int map_y, int map_layers, int spacin
|
||||||
|
|
||||||
|
void stbte_set_background_tile(stbte_tilemap *tm, short id)
|
||||||
|
{
|
||||||
|
- int i;
|
||||||
|
+ int i, j;
|
||||||
|
STBTE_ASSERT(id >= -1);
|
||||||
|
// STBTE_ASSERT(id < 32768);
|
||||||
|
if (id < -1)
|
||||||
|
return;
|
||||||
|
- for (i=0; i < STBTE_MAX_TILEMAP_X * STBTE_MAX_TILEMAP_Y; ++i)
|
||||||
|
- if (tm->data[0][i][0] == -1)
|
||||||
|
- tm->data[0][i][0] = id;
|
||||||
|
+ for (i=0; i < STBTE_MAX_TILEMAP_X; ++i)
|
||||||
|
+ for (j=0; j < STBTE_MAX_TILEMAP_Y; ++j)
|
||||||
|
+ if (tm->data[i][j][0] == -1)
|
||||||
|
+ tm->data[i][j][0] = id;
|
||||||
|
tm->background_tile = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1212,18 +1213,20 @@ void stbte_set_dimensions(stbte_tilemap *tm, int map_x, int map_y)
|
||||||
|
|
||||||
|
void stbte_clear_map(stbte_tilemap *tm)
|
||||||
|
{
|
||||||
|
- int i,j;
|
||||||
|
- for (i=0; i < STBTE_MAX_TILEMAP_X * STBTE_MAX_TILEMAP_Y; ++i) {
|
||||||
|
- tm->data[0][i][0] = tm->background_tile;
|
||||||
|
- for (j=1; j < tm->num_layers; ++j)
|
||||||
|
- tm->data[0][i][j] = STBTE__NO_TILE;
|
||||||
|
- for (j=0; j < STBTE_MAX_PROPERTIES; ++j)
|
||||||
|
- tm->props[0][i][j] = 0;
|
||||||
|
- #ifdef STBTE_ALLOW_LINK
|
||||||
|
- tm->link[0][i].x = -1;
|
||||||
|
- tm->link[0][i].y = -1;
|
||||||
|
- tm->linkcount[0][i] = 0;
|
||||||
|
- #endif
|
||||||
|
+ int i,j,k;
|
||||||
|
+ for (i=0; i < STBTE_MAX_TILEMAP_X; ++i) {
|
||||||
|
+ for (j=0; j < STBTE_MAX_TILEMAP_Y; ++j) {
|
||||||
|
+ tm->data[i][j][0] = tm->background_tile;
|
||||||
|
+ for (k=1; k < tm->num_layers; ++k)
|
||||||
|
+ tm->data[i][j][k] = STBTE__NO_TILE;
|
||||||
|
+ for (k=0; k < STBTE_MAX_PROPERTIES; ++k)
|
||||||
|
+ tm->props[i][j][k] = 0;
|
||||||
|
+ #ifdef STBTE_ALLOW_LINK
|
||||||
|
+ tm->link[i][j].x = -1;
|
||||||
|
+ tm->link[i][j].y = -1;
|
||||||
|
+ tm->linkcount[i][j] = 0;
|
||||||
|
+ #endif
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/stb_voxel_render.h b/stb_voxel_render.h
|
||||||
|
index 2e7a372f83..51011091f7 100644
|
||||||
|
--- a/stb_voxel_render.h
|
||||||
|
+++ b/stb_voxel_render.h
|
||||||
|
@@ -3126,15 +3126,17 @@ static void stbvox_make_mesh_for_block_with_geo(stbvox_mesh_maker *mm, stbvox_po
|
||||||
|
stbvox_mesh_vertex vmesh[6][4];
|
||||||
|
stbvox_rotate rotate = { 0,0,0,0 };
|
||||||
|
unsigned char simple_rot = rot;
|
||||||
|
- int i;
|
||||||
|
+ int i, j;
|
||||||
|
// we only need to do this for the displayed faces, but it's easier
|
||||||
|
// to just do it up front; @OPTIMIZE check if it's faster to do it
|
||||||
|
// for visible faces only
|
||||||
|
- for (i=0; i < 6*4; ++i) {
|
||||||
|
- int vert = stbvox_vertex_selector[0][i];
|
||||||
|
- vert = stbvox_rotate_vertex[vert][rot];
|
||||||
|
- vmesh[0][i] = stbvox_vmesh_pre_vheight[0][i]
|
||||||
|
- + stbvox_geometry_vheight[geo][vert];
|
||||||
|
+ for (i=0; i < 6; ++i) {
|
||||||
|
+ for (j=0; j < 4; ++j) {
|
||||||
|
+ int vert = stbvox_vertex_selector[i][j];
|
||||||
|
+ vert = stbvox_rotate_vertex[vert][rot];
|
||||||
|
+ vmesh[i][j] = stbvox_vmesh_pre_vheight[i][j]
|
||||||
|
+ + stbvox_geometry_vheight[geo][vert];
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
basevert = stbvox_vertex_encode(pos.x, pos.y, pos.z << STBVOX_CONFIG_PRECISION_Z, 0,0);
|
||||||
|
@@ -3275,11 +3277,13 @@ static void stbvox_make_mesh_for_block_with_geo(stbvox_mesh_maker *mm, stbvox_po
|
||||||
|
|
||||||
|
// build vertex mesh
|
||||||
|
{
|
||||||
|
- int i;
|
||||||
|
- for (i=0; i < 6*4; ++i) {
|
||||||
|
- int vert = stbvox_vertex_selector[0][i];
|
||||||
|
- vmesh[0][i] = stbvox_vmesh_pre_vheight[0][i]
|
||||||
|
- + cube[vert];
|
||||||
|
+ int i, j;
|
||||||
|
+ for (i=0; i < 6; ++i) {
|
||||||
|
+ for (j=0; j < 4; ++j) {
|
||||||
|
+ int vert = stbvox_vertex_selector[i][j];
|
||||||
|
+ vmesh[i][j] = stbvox_vmesh_pre_vheight[i][j]
|
||||||
|
+ + cube[vert];
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -3541,10 +3545,12 @@ int stbvox_get_buffer_size_per_quad(stbvox_mesh_maker *mm, int n)
|
||||||
|
|
||||||
|
void stbvox_reset_buffers(stbvox_mesh_maker *mm)
|
||||||
|
{
|
||||||
|
- int i;
|
||||||
|
- for (i=0; i < STBVOX_MAX_MESHES*STBVOX_MAX_MESH_SLOTS; ++i) {
|
||||||
|
- mm->output_cur[0][i] = 0;
|
||||||
|
- mm->output_buffer[0][i] = 0;
|
||||||
|
+ int i, j;
|
||||||
|
+ for (i=0; i < STBVOX_MAX_MESHES; ++i) {
|
||||||
|
+ for (j=0; j < STBVOX_MAX_MESH_SLOTS; ++j) {
|
||||||
|
+ mm->output_cur[i][j] = 0;
|
||||||
|
+ mm->output_buffer[i][j] = 0;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/tests/caveview/cave_mesher.c b/tests/caveview/cave_mesher.c
|
||||||
|
index 1f76c89812..bbf79898b6 100644
|
||||||
|
--- a/tests/caveview/cave_mesher.c
|
||||||
|
+++ b/tests/caveview/cave_mesher.c
|
||||||
|
@@ -802,7 +802,7 @@ void remap_in_place(int bt, int rm)
|
||||||
|
|
||||||
|
void mesh_init(void)
|
||||||
|
{
|
||||||
|
- int i;
|
||||||
|
+ int i, j;
|
||||||
|
|
||||||
|
chunk_cache_mutex = SDL_CreateMutex();
|
||||||
|
chunk_get_mutex = SDL_CreateMutex();
|
||||||
|
@@ -814,17 +814,19 @@ void mesh_init(void)
|
||||||
|
}
|
||||||
|
//effective_blocktype[50] = 0; // delete torches
|
||||||
|
|
||||||
|
- for (i=0; i < 6*256; ++i) {
|
||||||
|
- if (minecraft_tex1_for_blocktype[0][i] == 40)
|
||||||
|
- minecraft_color_for_blocktype[0][i] = 38 | 64; // apply to tex1
|
||||||
|
- if (minecraft_tex1_for_blocktype[0][i] == 39)
|
||||||
|
- minecraft_color_for_blocktype[0][i] = 39 | 64; // apply to tex1
|
||||||
|
- if (minecraft_tex1_for_blocktype[0][i] == 105)
|
||||||
|
- minecraft_color_for_blocktype[0][i] = 63; // emissive
|
||||||
|
- if (minecraft_tex1_for_blocktype[0][i] == 212)
|
||||||
|
- minecraft_color_for_blocktype[0][i] = 63; // emissive
|
||||||
|
- if (minecraft_tex1_for_blocktype[0][i] == 80)
|
||||||
|
- minecraft_color_for_blocktype[0][i] = 63; // emissive
|
||||||
|
+ for (i=0; i < 6; ++i) {
|
||||||
|
+ for (j=0; j < 256; ++j) {
|
||||||
|
+ if (minecraft_tex1_for_blocktype[i][j] == 40)
|
||||||
|
+ minecraft_color_for_blocktype[i][j] = 38 | 64; // apply to tex1
|
||||||
|
+ if (minecraft_tex1_for_blocktype[i][j] == 39)
|
||||||
|
+ minecraft_color_for_blocktype[i][j] = 39 | 64; // apply to tex1
|
||||||
|
+ if (minecraft_tex1_for_blocktype[i][j] == 105)
|
||||||
|
+ minecraft_color_for_blocktype[i][j] = 63; // emissive
|
||||||
|
+ if (minecraft_tex1_for_blocktype[i][j] == 212)
|
||||||
|
+ minecraft_color_for_blocktype[i][j] = 63; // emissive
|
||||||
|
+ if (minecraft_tex1_for_blocktype[i][j] == 80)
|
||||||
|
+ minecraft_color_for_blocktype[i][j] = 63; // emissive
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i=0; i < 6; ++i) {
|
||||||
|
diff --git a/tests/resample_test.cpp b/tests/resample_test.cpp
|
||||||
|
index 21f874f18b..bb8ad82ef6 100644
|
||||||
|
--- a/tests/resample_test.cpp
|
||||||
|
+++ b/tests/resample_test.cpp
|
||||||
|
@@ -646,8 +646,9 @@ void verify_box(void)
|
||||||
|
|
||||||
|
resample_88(STBIR_FILTER_BOX);
|
||||||
|
|
||||||
|
- for (i=0; i < sizeof(image88); ++i)
|
||||||
|
- STBIR_ASSERT(image88[0][i] == output88[0][i]);
|
||||||
|
+ for (i=0; i < sizeof(image88) / sizeof(image88[0]); ++i)
|
||||||
|
+ for (j=0; j < sizeof(image88[0]); ++j)
|
||||||
|
+ STBIR_ASSERT(image88[i][j] == output88[i][j]);
|
||||||
|
|
||||||
|
t = 0;
|
||||||
|
for (j=0; j < 4; ++j)
|
||||||
|
@@ -685,12 +686,14 @@ void test_filters(void)
|
||||||
|
|
||||||
|
mtsrand(0);
|
||||||
|
|
||||||
|
- for (i=0; i < sizeof(image88); ++i)
|
||||||
|
- image88[0][i] = mtrand() & 255;
|
||||||
|
+ for (i=0; i < sizeof(image88) / sizeof(image88[0]); ++i)
|
||||||
|
+ for (j=0; j < sizeof(image88[0]); ++j)
|
||||||
|
+ image88[i][j] = mtrand() & 255;
|
||||||
|
verify_box();
|
||||||
|
|
||||||
|
- for (i=0; i < sizeof(image88); ++i)
|
||||||
|
- image88[0][i] = 0;
|
||||||
|
+ for (i=0; i < sizeof(image88) / sizeof(image88[0]); ++i)
|
||||||
|
+ for (j=0; j < sizeof(image88[0]); ++j)
|
||||||
|
+ image88[i][j] = 0;
|
||||||
|
image88[4][4] = 255;
|
||||||
|
verify_box();
|
||||||
|
|
@ -0,0 +1,59 @@
|
|||||||
|
From 5818c4e48a7e7d4c21aacf3cd6f1c7e12f770924 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||||
|
Date: Wed, 18 Aug 2021 13:22:14 -0400
|
||||||
|
Subject: [PATCH] Fix misleading indentation in stb_divide.h
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
With -Wmisleading-indentation (part of -Wall), gcc 11.2.1 warns:
|
||||||
|
|
||||||
|
In file included from test_c_compilation.c:22:
|
||||||
|
../stb_divide.h: In function 'test':
|
||||||
|
../stb_divide.h:316:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
|
||||||
|
316 | if (show) printf("(%+11d,%+2d) ", q,r); stbdiv_check(q,r,a,b, "trunc",a);
|
||||||
|
| ^~
|
||||||
|
../stb_divide.h:316:45: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
|
||||||
|
316 | if (show) printf("(%+11d,%+2d) ", q,r); stbdiv_check(q,r,a,b, "trunc",a);
|
||||||
|
| ^~~~~~~~~~~~
|
||||||
|
../stb_divide.h:318:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
|
||||||
|
318 | if (show) printf("(%+11d,%+2d) ", q,r); stbdiv_check(q,r,a,b, "floor",b);
|
||||||
|
| ^~
|
||||||
|
../stb_divide.h:318:45: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
|
||||||
|
318 | if (show) printf("(%+11d,%+2d) ", q,r); stbdiv_check(q,r,a,b, "floor",b);
|
||||||
|
| ^~~~~~~~~~~~
|
||||||
|
../stb_divide.h:320:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
|
||||||
|
320 | if (show) printf("(%+11d,%+2d)\n", q,r); stbdiv_check(q,r,a,b, "euclidean",1);
|
||||||
|
| ^~
|
||||||
|
../stb_divide.h:320:45: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
|
||||||
|
320 | if (show) printf("(%+11d,%+2d)\n", q,r); stbdiv_check(q,r,a,b, "euclidean",1);
|
||||||
|
| ^~~~~~~~~~~~
|
||||||
|
|
||||||
|
This commit moves each call to stbdiv_check(…) to the following line to
|
||||||
|
make clear that it is unconditional and to resolve the warning.
|
||||||
|
---
|
||||||
|
stb_divide.h | 9 ++++++---
|
||||||
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/stb_divide.h b/stb_divide.h
|
||||||
|
index 6a51e3f2e..4c24143c4 100644
|
||||||
|
--- a/stb_divide.h
|
||||||
|
+++ b/stb_divide.h
|
||||||
|
@@ -313,11 +313,14 @@ void test(int a, int b)
|
||||||
|
int q,r;
|
||||||
|
if (show) printf("(%+11d,%+d) | ", a,b);
|
||||||
|
q = stb_div_trunc(a,b), r = stb_mod_trunc(a,b);
|
||||||
|
- if (show) printf("(%+11d,%+2d) ", q,r); stbdiv_check(q,r,a,b, "trunc",a);
|
||||||
|
+ if (show) printf("(%+11d,%+2d) ", q,r);
|
||||||
|
+ stbdiv_check(q,r,a,b, "trunc",a);
|
||||||
|
q = stb_div_floor(a,b), r = stb_mod_floor(a,b);
|
||||||
|
- if (show) printf("(%+11d,%+2d) ", q,r); stbdiv_check(q,r,a,b, "floor",b);
|
||||||
|
+ if (show) printf("(%+11d,%+2d) ", q,r);
|
||||||
|
+ stbdiv_check(q,r,a,b, "floor",b);
|
||||||
|
q = stb_div_eucl (a,b), r = stb_mod_eucl (a,b);
|
||||||
|
- if (show) printf("(%+11d,%+2d)\n", q,r); stbdiv_check(q,r,a,b, "euclidean",1);
|
||||||
|
+ if (show) printf("(%+11d,%+2d)\n", q,r);
|
||||||
|
+ stbdiv_check(q,r,a,b, "euclidean",1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void testh(int a, int b)
|
@ -0,0 +1,22 @@
|
|||||||
|
From 49c16b0c2a4efa72d0ce6ea05d3fa7d9e8fc6cba Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||||
|
Date: Thu, 19 Aug 2021 12:57:27 -0400
|
||||||
|
Subject: [PATCH] Add missing initializer braces in stb_easy_font.h
|
||||||
|
|
||||||
|
---
|
||||||
|
stb_easy_font.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/stb_easy_font.h b/stb_easy_font.h
|
||||||
|
index b66325847b..5f7511560a 100644
|
||||||
|
--- a/stb_easy_font.h
|
||||||
|
+++ b/stb_easy_font.h
|
||||||
|
@@ -202,7 +202,7 @@ static int stb_easy_font_print(float x, float y, char *text, unsigned char color
|
||||||
|
float start_x = x;
|
||||||
|
int offset = 0;
|
||||||
|
|
||||||
|
- stb_easy_font_color c = { 255,255,255,255 }; // use structure copying to avoid needing depending on memcpy()
|
||||||
|
+ stb_easy_font_color c = { { 255,255,255,255 } }; // use structure copying to avoid needing depending on memcpy()
|
||||||
|
if (color) { c.c[0] = color[0]; c.c[1] = color[1]; c.c[2] = color[2]; c.c[3] = color[3]; }
|
||||||
|
|
||||||
|
while (*text && offset < vbuf_size) {
|
@ -0,0 +1,24 @@
|
|||||||
|
From f9a5eaee846f1a19fbcda2f5adb5238a94cbbc2f Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
|
||||||
|
Date: Tue, 24 Aug 2021 11:45:48 -0400
|
||||||
|
Subject: [PATCH] Fix signature of dummy realloc() for STB_VORBIS_NO_CRT
|
||||||
|
|
||||||
|
---
|
||||||
|
stb_vorbis.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/stb_vorbis.c b/stb_vorbis.c
|
||||||
|
index 3e5c2504c..c1703426e 100644
|
||||||
|
--- a/stb_vorbis.c
|
||||||
|
+++ b/stb_vorbis.c
|
||||||
|
@@ -594,8 +594,8 @@ enum STBVorbisError
|
||||||
|
#else // STB_VORBIS_NO_CRT
|
||||||
|
#define NULL 0
|
||||||
|
#define malloc(s) 0
|
||||||
|
- #define free(s) ((void) 0)
|
||||||
|
- #define realloc(s) 0
|
||||||
|
+ #define free(p) ((void) 0)
|
||||||
|
+ #define realloc(p, s) 0
|
||||||
|
#endif // STB_VORBIS_NO_CRT
|
||||||
|
|
||||||
|
#include <limits.h>
|
@ -0,0 +1,37 @@
|
|||||||
|
From 5cf3af3181f7a0fb8d59ca5fe8daa011c1918d19 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ryan Wiedemann <Ryan1729@gmail.com>
|
||||||
|
Date: Mon, 25 Oct 2021 22:11:48 -0600
|
||||||
|
Subject: [PATCH] Predeclare stbhw__process struct to fix warnings
|
||||||
|
|
||||||
|
A subset of the warnings as produced by `clang`.
|
||||||
|
```
|
||||||
|
./../stb_herringbone_wang_tile.h:369:41: warning: declaration of 'struct stbhw__process' will not be visible outside of this function [-Wvisibility]
|
||||||
|
typedef void stbhw__process_rect(struct stbhw__process *p, int xpos, int ypos,
|
||||||
|
^
|
||||||
|
./../stb_herringbone_wang_tile.h:401:43: warning: incompatible pointer types passing 'stbhw__process *' (aka 'struct stbhw__process *') to parameter of type 'struct stbhw__process *' [-Wincompatible-pointer-types]
|
||||||
|
p->process_h_rect(p, xpos, ypos, a,b,c,d,e,f);
|
||||||
|
^
|
||||||
|
./../stb_herringbone_wang_tile.h:425:43: warning: incompatible pointer types passing 'stbhw__process *' (aka 'struct stbhw__process *') to parameter of type 'struct stbhw__process *' [-Wincompatible-pointer-types]
|
||||||
|
p->process_v_rect(p, xpos, ypos, a,b,c,d,e,f);
|
||||||
|
^
|
||||||
|
./../stb_herringbone_wang_tile.h:929:21: warning: incompatible pointer types assigning to 'stbhw__process_rect *' (aka 'void (*)(struct stbhw__process *, int, int, int, int, int, int, int, int)') from 'void (stbhw__process *, int, int, int, int, int, int, int, int)' (aka 'void (struct stbhw__process *, int, int, int, int, int, int, int, int)') [-Wincompatible-pointer-types]
|
||||||
|
p.process_h_rect = stbhw__parse_h_rect;
|
||||||
|
^ ~~~~~~~~~~~~~~~~~~~
|
||||||
|
```
|
||||||
|
---
|
||||||
|
stb_herringbone_wang_tile.h | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/stb_herringbone_wang_tile.h b/stb_herringbone_wang_tile.h
|
||||||
|
index 5517941f7a..92c238bb24 100644
|
||||||
|
--- a/stb_herringbone_wang_tile.h
|
||||||
|
+++ b/stb_herringbone_wang_tile.h
|
||||||
|
@@ -366,6 +366,8 @@ STBHW_EXTERN const char *stbhw_get_last_error(void)
|
||||||
|
// need to try to do more sophisticated parsing of edge color
|
||||||
|
// markup or something.
|
||||||
|
|
||||||
|
+struct stbhw__process;
|
||||||
|
+
|
||||||
|
typedef void stbhw__process_rect(struct stbhw__process *p, int xpos, int ypos,
|
||||||
|
int a, int b, int c, int d, int e, int f);
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
From 4e58258d8c434111fe2e8f1146ae0a72b0e8c554 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Neil Bickford <nbickford@nvidia.com>
|
||||||
|
Date: Sat, 25 Feb 2023 05:13:25 -0800
|
||||||
|
Subject: [PATCH] Fix nullptr dereference when a PIC file causes
|
||||||
|
stbi__pic_load_core to return 0, and the requested number of components to
|
||||||
|
stbi_load_from_memory is not 0 or 4
|
||||||
|
|
||||||
|
---
|
||||||
|
stb_image.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/stb_image.h b/stb_image.h
|
||||||
|
index 5e807a0a6..7e6ddeefd 100644
|
||||||
|
--- a/stb_image.h
|
||||||
|
+++ b/stb_image.h
|
||||||
|
@@ -6527,7 +6527,7 @@ static void *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_c
|
||||||
|
|
||||||
|
if (!stbi__pic_load_core(s,x,y,comp, result)) {
|
||||||
|
STBI_FREE(result);
|
||||||
|
- result=0;
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
*px = x;
|
||||||
|
*py = y;
|
@ -0,0 +1,24 @@
|
|||||||
|
From f100bfc302c0e095856c71a174714cce0a22e30a Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
|
||||||
|
Date: Thu, 19 Oct 2023 15:30:26 +0200
|
||||||
|
Subject: [PATCH] Fix integer overflow
|
||||||
|
|
||||||
|
Cast to `size_t` to avoid multiplication overflow.
|
||||||
|
Fixes #1529
|
||||||
|
---
|
||||||
|
stb_image.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/stb_image.h b/stb_image.h
|
||||||
|
index 5e807a0a6..552129bc4 100644
|
||||||
|
--- a/stb_image.h
|
||||||
|
+++ b/stb_image.h
|
||||||
|
@@ -1207,7 +1207,7 @@ static stbi__uint16 *stbi__convert_8_to_16(stbi_uc *orig, int w, int h, int chan
|
||||||
|
int img_len = w * h * channels;
|
||||||
|
stbi__uint16 *enlarged;
|
||||||
|
|
||||||
|
- enlarged = (stbi__uint16 *) stbi__malloc(img_len*2);
|
||||||
|
+ enlarged = (stbi__uint16 *) stbi__malloc(((size_t)img_len)*2);
|
||||||
|
if (enlarged == NULL) return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory");
|
||||||
|
|
||||||
|
for (i = 0; i < img_len; ++i)
|
@ -0,0 +1,36 @@
|
|||||||
|
From 178e1ab7684c46f233082a4f15308a54c9ae5a15 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
|
||||||
|
Date: Thu, 19 Oct 2023 15:38:33 +0200
|
||||||
|
Subject: [PATCH] Add overflow checks
|
||||||
|
|
||||||
|
Fixes #1531
|
||||||
|
---
|
||||||
|
stb_image.h | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/stb_image.h b/stb_image.h
|
||||||
|
index 5e807a0a6..aac3653ac 100644
|
||||||
|
--- a/stb_image.h
|
||||||
|
+++ b/stb_image.h
|
||||||
|
@@ -6990,6 +6990,10 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y,
|
||||||
|
stride = g.w * g.h * 4;
|
||||||
|
|
||||||
|
if (out) {
|
||||||
|
+ if (!stbi__mul2sizes_valid(layers, stride)) {
|
||||||
|
+ void *ret = stbi__load_gif_main_outofmem(&g, out, delays);
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
void *tmp = (stbi_uc*) STBI_REALLOC_SIZED( out, out_size, layers * stride );
|
||||||
|
if (!tmp)
|
||||||
|
return stbi__load_gif_main_outofmem(&g, out, delays);
|
||||||
|
@@ -7006,6 +7010,10 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y,
|
||||||
|
delays_size = layers * sizeof(int);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
+ if (!stbi__mul2sizes_valid(layers, stride)) {
|
||||||
|
+ void *ret = stbi__load_gif_main_outofmem(&g, out, delays);
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
out = (stbi_uc*)stbi__malloc( layers * stride );
|
||||||
|
if (!out)
|
||||||
|
return stbi__load_gif_main_outofmem(&g, out, delays);
|
@ -0,0 +1,23 @@
|
|||||||
|
From d66d0fe8c1a6ed393817791e4376374fa7f4ecc1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
|
||||||
|
Date: Thu, 19 Oct 2023 15:42:23 +0200
|
||||||
|
Subject: [PATCH] Fix int overflow
|
||||||
|
|
||||||
|
Fixes #1533
|
||||||
|
---
|
||||||
|
stb_image.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/stb_image.h b/stb_image.h
|
||||||
|
index 5e807a0a6..6d63ab32b 100644
|
||||||
|
--- a/stb_image.h
|
||||||
|
+++ b/stb_image.h
|
||||||
|
@@ -2222,7 +2222,7 @@ static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman
|
||||||
|
dc = j->img_comp[b].dc_pred + diff;
|
||||||
|
j->img_comp[b].dc_pred = dc;
|
||||||
|
if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG");
|
||||||
|
- data[0] = (short) (dc * dequant[0]);
|
||||||
|
+ data[0] = (short) ((size_t)dc * dequant[0]);
|
||||||
|
|
||||||
|
// decode AC components, see JPEG spec
|
||||||
|
k = 1;
|
@ -0,0 +1,24 @@
|
|||||||
|
From 8cfcbf7dde7705c849f4f7a5acb26f79b895fffe Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
|
||||||
|
Date: Thu, 19 Oct 2023 15:57:03 +0200
|
||||||
|
Subject: [PATCH] Fix wild address read in stbi__gif_load_next
|
||||||
|
|
||||||
|
It seems `layers` were forgotten to include in equation.
|
||||||
|
Fixes #1538
|
||||||
|
---
|
||||||
|
stb_image.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/stb_image.h b/stb_image.h
|
||||||
|
index 5e807a0a6..cd09ab697 100644
|
||||||
|
--- a/stb_image.h
|
||||||
|
+++ b/stb_image.h
|
||||||
|
@@ -7019,7 +7019,7 @@ static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y,
|
||||||
|
}
|
||||||
|
memcpy( out + ((layers - 1) * stride), u, stride );
|
||||||
|
if (layers >= 2) {
|
||||||
|
- two_back = out - 2 * stride;
|
||||||
|
+ two_back = out + (layers - 2) * stride;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (delays) {
|
@ -0,0 +1,25 @@
|
|||||||
|
From 973cdc889deaae2b97d1bdf9b793b96be02b9b3c Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
|
||||||
|
Date: Thu, 19 Oct 2023 16:03:41 +0200
|
||||||
|
Subject: [PATCH] Fix multi-byte read heap buffer overflow in
|
||||||
|
stbi__vertical_flip
|
||||||
|
|
||||||
|
Fixes #1540
|
||||||
|
---
|
||||||
|
stb_image.h | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/stb_image.h b/stb_image.h
|
||||||
|
index 5e807a0a6..49c53d092 100644
|
||||||
|
--- a/stb_image.h
|
||||||
|
+++ b/stb_image.h
|
||||||
|
@@ -1447,7 +1447,8 @@ STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int *
|
||||||
|
|
||||||
|
result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp);
|
||||||
|
if (stbi__vertically_flip_on_load) {
|
||||||
|
- stbi__vertical_flip_slices( result, *x, *y, *z, *comp );
|
||||||
|
+ int channels = req_comp ? req_comp : *comp;
|
||||||
|
+ stbi__vertical_flip_slices( result, *x, *y, *z, channels );
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
@ -0,0 +1,38 @@
|
|||||||
|
From 20f77a9b7f53624014e8c7224eeb182674111bcb Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
|
||||||
|
Date: Thu, 19 Oct 2023 16:10:45 +0200
|
||||||
|
Subject: [PATCH] Fix disclosure of uninitialized memory in stbi__tga_load
|
||||||
|
|
||||||
|
Fixes #1542
|
||||||
|
---
|
||||||
|
stb_image.h | 10 ++++++++--
|
||||||
|
1 file changed, 8 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/stb_image.h b/stb_image.h
|
||||||
|
index 5e807a0a6..7db6dd3df 100644
|
||||||
|
--- a/stb_image.h
|
||||||
|
+++ b/stb_image.h
|
||||||
|
@@ -5933,7 +5933,10 @@ static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req
|
||||||
|
for (i=0; i < tga_height; ++i) {
|
||||||
|
int row = tga_inverted ? tga_height -i - 1 : i;
|
||||||
|
stbi_uc *tga_row = tga_data + row*tga_width*tga_comp;
|
||||||
|
- stbi__getn(s, tga_row, tga_width * tga_comp);
|
||||||
|
+ if(!stbi__getn(s, tga_row, tga_width * tga_comp)) {
|
||||||
|
+ STBI_FREE(tga_data);
|
||||||
|
+ return stbi__errpuc("bad palette", "Corrupt TGA");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// do I need to load a palette?
|
||||||
|
@@ -7218,7 +7221,10 @@ static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int re
|
||||||
|
for (i=0; i < width; ++i) {
|
||||||
|
stbi_uc rgbe[4];
|
||||||
|
main_decode_loop:
|
||||||
|
- stbi__getn(s, rgbe, 4);
|
||||||
|
+ if (!stbi__getn(s, rgbe, 4)) {
|
||||||
|
+ STBI_FREE(hdr_data);
|
||||||
|
+ return stbi__errpf("invalid decoded scanline length", "corrupt HDR");
|
||||||
|
+ }
|
||||||
|
stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
From 746d207256ef408d92112a13a75aa8a42df6753f Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= <jarlob@github.com>
|
||||||
|
Date: Thu, 19 Oct 2023 16:39:06 +0200
|
||||||
|
Subject: [PATCH] Fix `0` byte write heap buffer overflow in `start_decoder`
|
||||||
|
|
||||||
|
Fixes #1552
|
||||||
|
---
|
||||||
|
stb_vorbis.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/stb_vorbis.c b/stb_vorbis.c
|
||||||
|
index 3e5c2504c0..8bc21de6b7 100644
|
||||||
|
--- a/stb_vorbis.c
|
||||||
|
+++ b/stb_vorbis.c
|
||||||
|
@@ -952,6 +952,7 @@ static void *setup_malloc(vorb *f, int sz)
|
||||||
|
sz = (sz+7) & ~7; // round up to nearest 8 for alignment of future allocs.
|
||||||
|
f->setup_memory_required += sz;
|
||||||
|
if (f->alloc.alloc_buffer) {
|
||||||
|
+ if (sz == 0) return NULL;
|
||||||
|
void *p = (char *) f->alloc.alloc_buffer + f->setup_offset;
|
||||||
|
if (f->setup_offset + sz > f->temp_offset) return NULL;
|
||||||
|
f->setup_offset += sz;
|
@ -0,0 +1,28 @@
|
|||||||
|
From 6e715778416b229799f85b49fa3ffc0400428f89 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Jeff Roberts (LA)" <jeffr@radgametools.com>
|
||||||
|
Date: Thu, 19 Oct 2023 17:42:58 -0700
|
||||||
|
Subject: [PATCH] Fixed asan error on tiny input images
|
||||||
|
|
||||||
|
---
|
||||||
|
stb_image_resize2.h | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/stb_image_resize2.h b/stb_image_resize2.h
|
||||||
|
index e0c428246..1d7bed5bd 100644
|
||||||
|
--- a/stb_image_resize2.h
|
||||||
|
+++ b/stb_image_resize2.h
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-/* stb_image_resize2 - v2.01 - public domain image resizing
|
||||||
|
+/* stb_image_resize2 - v2.02 - public domain image resizing
|
||||||
|
|
||||||
|
by Jeff Roberts (v2) and Jorge L Rodriguez
|
||||||
|
http://github.com/nothings/stb
|
||||||
|
@@ -3697,7 +3697,7 @@ static int stbir__pack_coefficients( int num_contributors, stbir__contributors*
|
||||||
|
float * coeffs = coefficents + widest * ( num_contributors - 1 );
|
||||||
|
|
||||||
|
// go until no chance of clipping (this is usually less than 8 lops)
|
||||||
|
- while ( ( ( contribs->n0 + widest*2 ) >= row_width ) && ( contribs >= contributors ) )
|
||||||
|
+ while ( ( contribs >= contributors ) && ( ( contribs->n0 + widest*2 ) >= row_width ) )
|
||||||
|
{
|
||||||
|
// might we clip??
|
||||||
|
if ( ( contribs->n0 + widest ) > row_width )
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue