]> Cypherpunks repositories - gostls13.git/commit
cc: fix an out of bounds array access
authorAnthony Martin <ality@pbrane.org>
Thu, 23 Feb 2012 19:28:16 +0000 (14:28 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 23 Feb 2012 19:28:16 +0000 (14:28 -0500)
commit436f297d1e8cb941d859a00467395a8c541035e6
treefc5c0a864c352a336148599ee2c228949ed3e71c
parent28e0e1886393cac863074631cc336de6b73a45bb
cc: fix an out of bounds array access

Alternatively, we could expand the ewidth array
in [568]c/txt.c to have NALLTYPES elements and
give all types above NTYPE a width of -1.

I don't think it's worth it since TDOT and TOLD
are the only two type values above NTYPE that
are passed to typ:

$ /tmp/cctypes
cc/dcl.c:683:  t->down = typ(TOLD, T);
cc/dcl.c:919:  return typ(TDOT, T);
$

Fixes #3063.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5694047
src/cmd/cc/sub.c