commit | f5cdd574a531ed156d30efe2e06c4cf463469588 | [log] [tgz] |
---|---|---|
author | Lucas De Marchi <lucas.demarchi@intel.com> | Mon Apr 07 12:27:11 2014 -0300 |
committer | Lucas De Marchi <lucas.demarchi@intel.com> | Mon Apr 07 12:30:04 2014 -0300 |
tree | 26e07952aea7dddd8e2f5701c5efaaa4f7d9e6fa | |
parent | 04c0956e207e3b27a700494f8dc77f902cd53731 [diff] |
Make sure there's NUL byte at the end of strndupa Since strcpy() doesn't ensure we have a NUL byte in the resulting string, use alloca() + memcpy(). Also make sure we don't evaluate "s" twice.