~mdw
/
sgt
/
tweak
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Prevent obvious NULL dereference if you paste before cutting or copying.
[sgt/tweak]
/
actions.c
diff --git
a/actions.c
b/actions.c
index
a6d96bd
..
fb71b9f
100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-462,6
+462,8
@@
static void act_copy (void) {
static void act_paste (void) {
fileoffset_t cutsize, new_top;
+ if (!cutbuffer)
+ return;
cutsize = buf_length (cutbuffer);
if (!insert_mode) {
if (cur_pos + cutsize > file_size) {