projects
/
project
/
firewall4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5994466
)
fw4: fix crash in parse_cthelper() if no helpers are present
author
Jo-Philipp Wich
<jo@mein.io>
Mon, 13 Jun 2022 13:48:35 +0000
(15:48 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Tue, 14 Jun 2022 14:54:06 +0000
(16:54 +0200)
Properly deal with a possibly uninitialized helper object array.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
root/usr/share/ucode/fw4.uc
patch
|
blob
|
history
diff --git
a/root/usr/share/ucode/fw4.uc
b/root/usr/share/ucode/fw4.uc
index db1e580ba0e9ee70c1e7bdb00213d819be074203..95e2540a74da869784f562dcada87c811eba51c2 100644
(file)
--- a/
root/usr/share/ucode/fw4.uc
+++ b/
root/usr/share/ucode/fw4.uc
@@
-1037,7
+1037,7
@@
return {
if (!rv)
return null;
- let helper = filter(this.state.helpers, h => (h.name == rv.val))[0];
+ let helper = filter(this.state.helpers, h => (h.name == rv.val))
?.
[0];
return helper ? { ...rv, ...helper } : null;
},