summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctld/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ctld/parse.y')
-rw-r--r--usr.sbin/ctld/parse.y10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.sbin/ctld/parse.y b/usr.sbin/ctld/parse.y
index 1de1e88..da5d52c 100644
--- a/usr.sbin/ctld/parse.y
+++ b/usr.sbin/ctld/parse.y
@@ -808,6 +808,11 @@ lun_number: STR
free($1);
return (1);
}
+ if (tmp >= MAX_LUNS) {
+ yyerror("LU number is too big");
+ free($1);
+ return (1);
+ }
ret = asprintf(&name, "%s,lun,%ju", target->t_name, tmp);
if (ret <= 0)
@@ -832,6 +837,11 @@ target_lun_ref: LUN STR STR
return (1);
}
free($2);
+ if (tmp >= MAX_LUNS) {
+ yyerror("LU number is too big");
+ free($3);
+ return (1);
+ }
lun = lun_find(conf, $3);
free($3);
OpenPOWER on IntegriCloud