tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
dmraid: add patch to build with format hardening
Robin Gloster
10 years ago
cce1bad2
e7213824
+20
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
dmraid
default.nix
hardening-format.patch
+2
pkgs/os-specific/linux/dmraid/default.nix
···
8
8
sha256 = "0m92971gyqp61darxbiri6a48jz3wq3gkp8r2k39320z0i6w8jgq";
9
9
};
10
10
11
11
+
patches = [ ./hardening-format.patch ];
12
12
+
11
13
postPatch = ''
12
14
sed -i 's/\[\[[^]]*\]\]/[ "''$''${n##*.}" = "so" ]/' */lib/Makefile.in
13
15
'';
+18
pkgs/os-specific/linux/dmraid/hardening-format.patch
···
1
1
+
--- a/1.0.0.rc16/lib/events/libdmraid-events-isw.c 2016-01-29 05:16:57.455425454 +0000
2
2
+
+++ b/1.0.0.rc16/lib/events/libdmraid-events-isw.c 2016-01-29 05:17:55.520564013 +0000
3
3
+
@@ -838,13 +838,13 @@
4
4
+
5
5
+
sz = _log_all_devs(log_type, rs, NULL, 0);
6
6
+
if (!sz) {
7
7
+
- syslog(LOG_ERR, msg[0]);
8
8
+
+ syslog(LOG_ERR, "%s", msg[0]);
9
9
+
return;
10
10
+
}
11
11
+
12
12
+
str = dm_malloc(++sz);
13
13
+
if (!str) {
14
14
+
- syslog(LOG_ERR, msg[1]);
15
15
+
+ syslog(LOG_ERR, "%s", msg[1]);
16
16
+
return;
17
17
+
}
18
18
+