diff options
author | Steven Moreland <smoreland@google.com> | 2017-02-17 14:10:17 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-02-17 14:10:17 +0000 |
commit | b54e30bdf0979e26720099671bc61c5025375738 (patch) | |
tree | b2b1b32e0f737a84f89342ced78d46c0c2b8d178 /base/HidlSupport.cpp | |
parent | b2c5b69d1d12f0c1b7381ebaa6d57adea5ee8e12 (diff) | |
parent | 072984bb72b181c5bbfc57d776a4bd49abbe43b5 (diff) | |
download | libhidl-b54e30bdf0979e26720099671bc61c5025375738.tar.gz |
hidl_string: allow null cstr am: a21d84f11f am: 55107b3754 am: f78b5afd0a
am: 072984bb72
Change-Id: I6fc221a0c03665370434caad683613a9223f8d6d
Diffstat (limited to 'base/HidlSupport.cpp')
-rw-r--r-- | base/HidlSupport.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp index dd93534..b359f1d 100644 --- a/base/HidlSupport.cpp +++ b/base/HidlSupport.cpp @@ -196,6 +196,10 @@ hidl_string::~hidl_string() { } hidl_string::hidl_string(const char *s) : hidl_string() { + if (s == nullptr) { + return; + } + copyFrom(s, strlen(s)); } |