Skip to content

Commit 803e92a

Browse files
authored
Merge pull request syslog-ng#4830 from therandomstring/security-fixes
Random fixes
2 parents d56a847 + 3b1e398 commit 803e92a

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

contrib/syslog-ng-helm-chart/templates/compress-job.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ spec:
3232
containers:
3333
- name: compress
3434
image: "ubuntu:20.10"
35+
resources:
36+
limits:
37+
cpu: 500m
38+
memory: 2048Mi
3539
command:
3640
- /bin/entrypoint.sh
3741
volumeMounts:

contrib/syslog-ng-helm-chart/templates/tests/test-connection.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ metadata:
77
annotations:
88
"helm.sh/hook": test-success
99
spec:
10+
automountServiceAccountToken: false
1011
containers:
1112
- name: wget
1213
image: busybox
1314
command: ['wget']
1415
args: ['{{ include "syslog-ng.fullname" . }}:{{ .Values.service.port }}']
16+
resources:
17+
limits:
18+
cpu: 100m
19+
memory: 256Mi
1520
restartPolicy: Never

modules/java/src/main/java/org/syslog_ng/SyslogNgClassLoader.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,16 @@ private static List<String> resolveWildCardFileName(String path) {
9090
List<String> result = new ArrayList<String>();
9191
File f = new File(path);
9292
final String basename = f.getName();
93-
String dirname = f.getParent();
94-
File dir = new File(dirname);
93+
File dir;
94+
try {
95+
String dirname = f.getParent();
96+
dir = new File(dirname);
97+
}
98+
catch (NullPointerException e) {
99+
InternalMessageSender.error("Error. Null pointer dereference. Path or pattern might not exist:" + path + ". Error:" + e.getMessage());
100+
e.printStackTrace(System.err);
101+
return result;
102+
}
95103
File[] files = dir.listFiles(new FilenameFilter() {
96104

97105
public boolean accept(File dir, String name) {

0 commit comments

Comments
 (0)