This is an automated email from the ASF dual-hosted git repository.
kichan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new f286fe8603 Use of uninitialized variables reported by oss-fuzz (#10068)
f286fe8603 is described below
commit f286fe86031d08fdf92928deb6ac91ba8662bc75
Author: Kit Chan <[email protected]>
AuthorDate: Fri Jul 21 09:30:43 2023 -0700
Use of uninitialized variables reported by oss-fuzz (#10068)
* initialize variables reported by oss-fuzz
* fix according to comments
---
src/tscore/Regex.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/tscore/Regex.cc b/src/tscore/Regex.cc
index e8195f0de2..22bb2e1c9e 100644
--- a/src/tscore/Regex.cc
+++ b/src/tscore/Regex.cc
@@ -55,10 +55,10 @@ Regex::Regex(Regex &&that) noexcept : regex(that.regex),
regex_extra(that.regex_
bool
Regex::compile(const char *pattern, const unsigned flags)
{
- const char *error;
- int erroffset;
- int options = 0;
- int study_opts = 0;
+ const char *error = nullptr;
+ int erroffset = 0;
+ int options = 0;
+ int study_opts = 0;
if (regex) {
return false;