commit | a6e6c60e3a97a6b3a033cd052bb3740fd53cbf4c | [log] [tgz] |
---|---|---|
author | Horst Kronstorfer <hkronsto@frequentis.com> | Tue Feb 07 10:02:53 2012 +0100 |
committer | Jon Loeliger <jdl@jdl.com> | Thu Feb 16 06:43:51 2012 -0600 |
tree | f340f4db6218cf8729abd65cbb9944ad30608c69 | |
parent | e280442e08fcbe8431dc85d836ff3ecc489932fb [diff] |
dtc: Fix zero-length input segfault This patch fixes a segmentation fault caused by dereferencing a NULL pointer (pos->file aka yylloc.file) in srcpos_string when the input length is 0 (fe 'dtc </dev/null'.) Reason: yylloc.file is initialized with 0 and the tokenizer, which updates yylloc.file via srcpos_update doesn't get a chance to run on zero-length input. Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>