Page MenuHomeFreeBSD

D26246.diff
No OneTemporary

D26246.diff

Index: head/usr.sbin/ctld/kernel.c
===================================================================
--- head/usr.sbin/ctld/kernel.c
+++ head/usr.sbin/ctld/kernel.c
@@ -238,10 +238,16 @@
cur_lun->backend_type = str;
str = NULL;
} else if (strcmp(name, "lun_type") == 0) {
+ if (str == NULL)
+ log_errx(1, "%s: %s missing its argument", __func__, name);
cur_lun->device_type = strtoull(str, NULL, 0);
} else if (strcmp(name, "size") == 0) {
+ if (str == NULL)
+ log_errx(1, "%s: %s missing its argument", __func__, name);
cur_lun->size_blocks = strtoull(str, NULL, 0);
} else if (strcmp(name, "blocksize") == 0) {
+ if (str == NULL)
+ log_errx(1, "%s: %s missing its argument", __func__, name);
cur_lun->blocksize = strtoul(str, NULL, 0);
} else if (strcmp(name, "serial_number") == 0) {
cur_lun->serial_number = str;
@@ -357,15 +363,23 @@
cur_port->port_name = str;
str = NULL;
} else if (strcmp(name, "physical_port") == 0) {
+ if (str == NULL)
+ log_errx(1, "%s: %s missing its argument", __func__, name);
cur_port->pp = strtoul(str, NULL, 0);
} else if (strcmp(name, "virtual_port") == 0) {
+ if (str == NULL)
+ log_errx(1, "%s: %s missing its argument", __func__, name);
cur_port->vp = strtoul(str, NULL, 0);
} else if (strcmp(name, "cfiscsi_target") == 0) {
cur_port->cfiscsi_target = str;
str = NULL;
} else if (strcmp(name, "cfiscsi_state") == 0) {
+ if (str == NULL)
+ log_errx(1, "%s: %s missing its argument", __func__, name);
cur_port->cfiscsi_state = strtoul(str, NULL, 0);
} else if (strcmp(name, "cfiscsi_portal_group_tag") == 0) {
+ if (str == NULL)
+ log_errx(1, "%s: %s missing its argument", __func__, name);
cur_port->cfiscsi_portal_group_tag = strtoul(str, NULL, 0);
} else if (strcmp(name, "ctld_portal_group_name") == 0) {
cur_port->ctld_portal_group_name = str;

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 11:20 PM (21 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14667377
Default Alt Text
D26246.diff (1 KB)

Event Timeline