mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-23 23:09:39 +03:00
[project @ 2005-09-01 03:21:13 by adrianl]
Fix NULL read svn path=/import/netsurf/; revision=1858
This commit is contained in:
parent
799cc06016
commit
84f43ac3a0
@ -170,11 +170,12 @@ void ro_gui_selection_drag_end(struct gui_window *g, wimp_dragged *drag)
|
|||||||
|
|
||||||
bool copy_handler(struct box *box, int offset, size_t length, void *handle)
|
bool copy_handler(struct box *box, int offset, size_t length, void *handle)
|
||||||
{
|
{
|
||||||
size_t len = min(length, box->length - offset);
|
|
||||||
const char *text;
|
|
||||||
bool space = false;
|
bool space = false;
|
||||||
|
const char *text;
|
||||||
|
size_t len;
|
||||||
|
|
||||||
if (box) {
|
if (box) {
|
||||||
|
len = min(length, box->length - offset);
|
||||||
text = box->text + offset;
|
text = box->text + offset;
|
||||||
if (box->space && length > len) space = true;
|
if (box->space && length > len) space = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user