summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcloder <cloder@openbsd.org>2005-04-11 14:59:01 +0000
committercloder <cloder@openbsd.org>2005-04-11 14:59:01 +0000
commit89815c807a24f55458856009226e8ae638181521 (patch)
tree439f75236224f4fdbff0088cbe23c0f37712413e
parentpass size of right buffer to strlcat. ok deraadt@ (diff)
downloadwireguard-openbsd-89815c807a24f55458856009226e8ae638181521.tar.xz
wireguard-openbsd-89815c807a24f55458856009226e8ae638181521.zip
Check for asprintf failure. From Bruno Rohee (thank you).
-rw-r--r--sbin/scsi/scsi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/scsi/scsi.c b/sbin/scsi/scsi.c
index 434bfac0f3a..e0c2846b0c9 100644
--- a/sbin/scsi/scsi.c
+++ b/sbin/scsi/scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi.c,v 1.16 2005/04/09 02:14:32 cloder Exp $ */
+/* $OpenBSD: scsi.c,v 1.17 2005/04/11 14:59:01 cloder Exp $ */
/* $FreeBSD: scsi.c,v 1.11 1996/04/06 11:00:28 joerg Exp $ */
/*
@@ -739,7 +739,9 @@ edit_edit(void)
fclose(edit_file);
- asprintf(&system_line, "%s %s", editor, edit_name);
+ if (asprintf(&system_line, "%s %s", editor, edit_name) == -1)
+ err(1, NULL);
+
system(system_line);
free(system_line);