summary refs log tree commit diff stats
path: root/icons/nim.res
diff options
context:
space:
mode:
authorAndrei Formiga <archimedes_siracusa@hotmail.com>2016-05-27 19:03:15 -0300
committerAndrei Formiga <archimedes_siracusa@hotmail.com>2016-05-27 19:03:15 -0300
commitc439ef2e71f6c98aa0a9de1d2036a5422454171c (patch)
tree63334c840744169563ce39205bb14fca92d60e6c /icons/nim.res
parent51c62a211bca12cc2f470add7bf64b0f4536d6e6 (diff)
downloadNim-c439ef2e71f6c98aa0a9de1d2036a5422454171c.tar.gz
Fix issue #4001: invalid pragma {. hint[]: off .}
The bug was in processNote, module pragmas. The code assumed that
a nkBracketExpr AST node always had two children (without testing
this), and tried to access elements with index 0 and 1 in the sons
array of the nkBracketExpr node.

The code that triggered the bug was just {. hint[]: off .}
by itself in a module; in this case the nkBracketExpr has only
one children in the sons array, so the code in processNote caused
an out-of-bounds array access.

This commit also adds a test to guarantee that this pragma is
rejected, as is.
Diffstat (limited to 'icons/nim.res')
0 files changed, 0 insertions, 0 deletions