diff options
author | Adrian Lees <adrian@aemulor.com> | 2005-09-01 03:21:13 +0000 |
---|---|---|
committer | Adrian Lees <adrian@aemulor.com> | 2005-09-01 03:21:13 +0000 |
commit | 84f43ac3a09f4cd27f285d45a460ec43b14a6f2d (patch) | |
tree | 99d54135c9e05283fd4684c7e4984820fa0d46d4 | |
parent | 799cc060164f32789af151559cf4c70076ef4f10 (diff) | |
download | netsurf-84f43ac3a09f4cd27f285d45a460ec43b14a6f2d.tar.gz netsurf-84f43ac3a09f4cd27f285d45a460ec43b14a6f2d.tar.bz2 |
[project @ 2005-09-01 03:21:13 by adrianl]
Fix NULL read
svn path=/import/netsurf/; revision=1858
-rw-r--r-- | riscos/textselection.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/riscos/textselection.c b/riscos/textselection.c index 2a7762887..1d478a431 100644 --- a/riscos/textselection.c +++ b/riscos/textselection.c @@ -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) { - size_t len = min(length, box->length - offset); - const char *text; bool space = false; + const char *text; + size_t len; if (box) { + len = min(length, box->length - offset); text = box->text + offset; if (box->space && length > len) space = true; } |