Fix a stack-buffer-overrun found by address-sanitizer.
Turn on address-sanitizer in develop build.

Has no effect on GCC < 4.8 and LLVM < 3.1.