Vincent Tran has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/11286


Change subject: IMPALA-6844: Fix possible NULL dereference in to_date() builtin
......................................................................

IMPALA-6844: Fix possible NULL dereference in to_date() builtin

If result.ptr allocation fails for some reason inside the StringVal
constructor, we still overwrite result.len and continue.

This change checks that the the StringVal pointer is not NULL before
dereferencing it, and returns NULL if it is.

Testing: Added a test case of the to_date() function to
alloc-fail-init.test to leverage the fault injector
 --stress_fn_ctx_alloc.

Change-Id: I14cfb29a592885bb2f39958c8644f93db5220a68
---
M be/src/exprs/timestamp-functions-ir.cc
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/86/11286/1
--
To view, visit http://gerrit.cloudera.org:8080/11286
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I14cfb29a592885bb2f39958c8644f93db5220a68
Gerrit-Change-Number: 11286
Gerrit-PatchSet: 1
Gerrit-Owner: Vincent Tran <vtt...@cloudera.com>

Reply via email to