Fix NULL ptr dereference with bad type
commitb33b1404376051fb2657c65d36f7708c4dd19867
authorLinus Torvalds <torvalds@g5.osdl.org>
Sat, 10 Jun 2006 18:58:53 +0000 (10 11:58 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 10 Jun 2006 18:58:53 +0000 (10 11:58 -0700)
tree102ba6faad7786c4897b31d63a81d97eb20dc753
parentaf5dedd5891ad6ac297fba2df49fcb7c2c825a35
Fix NULL ptr dereference with bad type

Noted by Alexey Dobriyan, who also sent in a small test-case.

When evaluating to a bad type, just use "&bad_ctype" rather than
returning NULL.  That will also mean that we won't be re-evaluating that
expression over and over again - we'll just mark the expr->ctype to be
bad, once and for all.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
evaluate.c