diff options
author | mdf <mdf@FreeBSD.org> | 2013-12-12 02:03:42 +0000 |
---|---|---|
committer | mdf <mdf@FreeBSD.org> | 2013-12-12 02:03:42 +0000 |
commit | cf9afebc6a89230e1c6e4972c4ca3bccd81a4750 (patch) | |
tree | 3d3918b92257dc5eec9879c2c364c02650724896 /contrib/gcclibs/libcpp/internal.h | |
parent | 346b651e7c689cdfc0381ab30c7bebb4ca95dc0f (diff) | |
download | FreeBSD-src-cf9afebc6a89230e1c6e4972c4ca3bccd81a4750.zip FreeBSD-src-cf9afebc6a89230e1c6e4972c4ca3bccd81a4750.tar.gz |
MFC r258658:
Fix a segfault / internal compiler error.
Among other causes, when gcc throws a warning before parsing any tokens,
the cur_token pointer is at the beginning of malloc'd memory.
Dereferencing cur_token[-1] can cause a segfault.
Code taken from OpenBSD
http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/gcc/libcpp/errors.c
which was a more complete fix than the one I originally coded.
Diffstat (limited to 'contrib/gcclibs/libcpp/internal.h')
0 files changed, 0 insertions, 0 deletions