summaryrefslogtreecommitdiffstats
path: root/usr.bin/colldef
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2001-11-27 23:39:14 +0000
committerache <ache@FreeBSD.org>2001-11-27 23:39:14 +0000
commitc5c274cf2c1c3f51f2c5da3acf04d8098f3e2784 (patch)
tree7a3267eac108f559ff1d55d30f23f6b75a25986d /usr.bin/colldef
parentd1f6a55d626d3ba59c4acc8a065b54b5d228872a (diff)
downloadFreeBSD-src-c5c274cf2c1c3f51f2c5da3acf04d8098f3e2784.zip
FreeBSD-src-c5c274cf2c1c3f51f2c5da3acf04d8098f3e2784.tar.gz
Add safeguard to prevent charmap symbol length overflowing
Diffstat (limited to 'usr.bin/colldef')
-rw-r--r--usr.bin/colldef/parse.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/colldef/parse.y b/usr.bin/colldef/parse.y
index 0525955..2d47cf6 100644
--- a/usr.bin/colldef/parse.y
+++ b/usr.bin/colldef/parse.y
@@ -80,6 +80,8 @@ statment :
| order
;
charmap : DEFN CHAR {
+ if (strlen($1) + 1 > CHARMAP_SYMBOL_LEN)
+ yyerror("Charmap symbol name '%s' is too long", $1);
strcpy(charmap_table[$2], $1);
}
;
OpenPOWER on IntegriCloud