diff options
author | sergey ignatov <sergign60@mail.ru> | 2017-05-05 18:12:07 +0300 |
---|---|---|
committer | Brian Robbins <brianrob@microsoft.com> | 2017-05-05 08:12:07 -0700 |
commit | f0a850b785d73740add815329409183de23a2c35 (patch) | |
tree | b846604d45b27113f71669e323d761f0c83cb117 /src/scripts | |
parent | f3bf62697c63e1bc4c383b9af82d0d3e42ac2afd (diff) | |
download | coreclr-f0a850b785d73740add815329409183de23a2c35.tar.gz coreclr-f0a850b785d73740add815329409183de23a2c35.tar.bz2 coreclr-f0a850b785d73740add815329409183de23a2c35.zip |
Fixed issue #11383 (#11385)
Diffstat (limited to 'src/scripts')
-rw-r--r-- | src/scripts/genXplatLttng.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/scripts/genXplatLttng.py b/src/scripts/genXplatLttng.py index bacf034868..6dd60b0a0b 100644 --- a/src/scripts/genXplatLttng.py +++ b/src/scripts/genXplatLttng.py @@ -593,6 +593,7 @@ bool ResizeBuffer(char *&buffer, int& size, int currLen, int newSize, bool &fixe bool WriteToBuffer(const BYTE *src, int len, char *&buffer, int& offset, int& size, bool &fixedBuffer) { + if (!src) return true; if (offset + len) { if (!ResizeBuffer(buffer, size, offset, size + len, fixedBuffer)) @@ -606,6 +607,7 @@ bool WriteToBuffer(const BYTE *src, int len, char *&buffer, int& offset, int& si bool WriteToBuffer(PCWSTR str, char *&buffer, int& offset, int& size, bool &fixedBuffer) { + if (!str) return true; int byteCount = (PAL_wcslen(str) + 1) * sizeof(*str); if (offset + byteCount) @@ -621,6 +623,7 @@ bool WriteToBuffer(PCWSTR str, char *&buffer, int& offset, int& size, bool &fixe bool WriteToBuffer(const char *str, char *&buffer, int& offset, int& size, bool &fixedBuffer) { + if (!str) return true; int len = strlen(str) + 1; if (offset + len) { @@ -762,4 +765,4 @@ def main(argv): if __name__ == '__main__': return_code = main(sys.argv[1:]) - sys.exit(return_code)
\ No newline at end of file + sys.exit(return_code) |