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
commit6663936c3ed16b854656dec4c83fee7a74d5ec09 (patch)
tree464c2ba49b04827acd4ef262df611f322b8c0b22 /bin
parentAdd cash.7 README (diff)
downloadsrc-6663936c3ed16b854656dec4c83fee7a74d5ec09.tar.gz
src-6663936c3ed16b854656dec4c83fee7a74d5ec09.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 bb7997e2..dd40b3d5 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);
 		}
 	}