preproc: Fix accessing OOM address
commitbbb7a1aad9bc5e13ab5c2268bc318a94b796eed2
authorCyrill Gorcunov <gorcunov@gmail.com>
Sun, 19 Jun 2016 09:15:24 +0000 (19 12:15 +0300)
committerCyrill Gorcunov <gorcunov@gmail.com>
Sun, 19 Jun 2016 09:15:24 +0000 (19 12:15 +0300)
tree375a56c4a17a35965f8f16cdf469a1e65e61d628
parent41d8a171952965f6a78b7e6a11cfeb9e3f5e43ad
preproc: Fix accessing OOM address

In case if there is no environment variable present
we allocated empty string but when working with tokens
we test for second byte for special symbols, accessing
out of memory address (->text[1] for the reference).

http://bugzilla.nasm.us/show_bug.cgi?id=3392333

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
preproc.c