summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-01-14 20:18:06 -0500
committerJune McEnroe <june@causal.agency>2019-01-14 20:18:06 -0500
commit51877fbd51e1a7c82f32d3db6fd490b4f1569ab7 (patch)
treefb5affabf56e4dbdc51e9819d5a1cb8f57a777b5 /bin
parentAdd cash.7 README (diff)
downloadsrc-51877fbd51e1a7c82f32d3db6fd490b4f1569ab7.tar.gz
src-51877fbd51e1a7c82f32d3db6fd490b4f1569ab7.zip
Check for NULL copy or undo buffers in psfed
Diffstat (limited to '')
-rw-r--r--bin/psfed.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/psfed.c b/bin/psfed.c
index 8b811ccd..63308ae5 100644
--- a/bin/psfed.c
+++ b/bin/psfed.c
@@ -419,9 +419,11 @@ static void inputEdit(char ch) {
 		}
 
 		break; case 'p': {
+			if (!edit.copy) break;
 			memcpy(glyph(edit.index), edit.copy, header.glyph.size);
 		}
 		break; case 'u': {
+			if (!edit.undo) break;
 			memcpy(glyph(edit.index), edit.undo, header.glyph.size);
 		}
 	}