summaryrefslogtreecommitdiff
path: root/src/glibext/gbufferline.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-08 11:06:17 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-08 11:06:17 (GMT)
commit3ad8e821ec6a6e8408a9fc737b385aa863c67123 (patch)
tree078e95ac23aabe0762d9a48746f363bf7bd91600 /src/glibext/gbufferline.c
parentf36b525987442d46c920f76dced29356663ae85b (diff)
Fixed one UAF when dealing with line text segments.
Diffstat (limited to 'src/glibext/gbufferline.c')
-rw-r--r--src/glibext/gbufferline.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glibext/gbufferline.c b/src/glibext/gbufferline.c
index 2a3a04f..3dcbbd4 100644
--- a/src/glibext/gbufferline.c
+++ b/src/glibext/gbufferline.c
@@ -1029,14 +1029,14 @@ gint g_buffer_line_compute_max_width(const GBufferLine *line, BufferLineColumn i
* *
******************************************************************************/
-const line_segment *g_buffer_line_get_segment_from_coord(const GBufferLine *line, const col_coord_t *coord)
+line_segment *g_buffer_line_get_segment_from_coord(const GBufferLine *line, const col_coord_t *coord)
{
line_segment *result; /* Trouvaille à retourner */
if (coord->column < BLC_COUNT)
result = get_line_column_content_from_index(&line->columns[coord->column], coord->index);
else
- result = false;
+ result = NULL;
return result;
@@ -1269,9 +1269,9 @@ bool g_buffer_line_get_coord_at(const GBufferLine *line, const line_width_summar
* *
******************************************************************************/
-const line_segment *g_buffer_line_get_segment_at(const GBufferLine *line, const line_width_summary *summary, const GDisplayOptions *options, const line_width_summary *offsets, gint *base, gint *offset, GdkScrollDirection dir, bool force)
+line_segment *g_buffer_line_get_segment_at(const GBufferLine *line, const line_width_summary *summary, const GDisplayOptions *options, const line_width_summary *offsets, gint *base, gint *offset, GdkScrollDirection dir, bool force)
{
- const line_segment *result; /* Trouvaille à retourner */
+ line_segment *result; /* Trouvaille à retourner */
col_coord_t coord; /* Emplacement du contenu visé */
bool status; /* Bilan de la localisation */