YARN-5736 Addendum. Fixes segfault due to unterminated string. (Contributed by Miklos Szegedi via Daniel Templeton)
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/264ddb13 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/264ddb13 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/264ddb13 Branch: refs/heads/HADOOP-13345 Commit: 264ddb13ff7455282fb640b6ff6c565adddea44e Parents: 4fcea8a Author: Daniel Templeton <templ...@apache.org> Authored: Tue Nov 15 13:01:57 2016 -0800 Committer: Daniel Templeton <templ...@apache.org> Committed: Tue Nov 15 13:01:57 2016 -0800 ---------------------------------------------------------------------- .../src/main/native/container-executor/impl/configuration.c | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/264ddb13/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/configuration.c ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/configuration.c b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/configuration.c index 8da7d24..a6d7a9c 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/configuration.c +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/container-executor/impl/configuration.c @@ -156,6 +156,7 @@ char* trim(char* input) } strncpy(ret, val_begin, val_end - val_begin); + ret[val_end - val_begin] = '\0'; return ret; } --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org