mhddfs: fix-format-security (#23276)

* mhddfs: fix-format-security

* mhddfs: use fputs instead of fprintf

authored by Felix Richter and committed by Jörg Thalheim e748e18d 768fac6c

+16
+4
pkgs/tools/filesystems/mhddfs/default.nix
··· 11 11 12 12 buildInputs = [ fuse pkgconfig attr uthash ]; 13 13 14 + patches = [ 15 + ./fix-format-security-error.patch 16 + ]; 17 + 14 18 installPhase = '' 15 19 mkdir -p $out/bin 16 20 cp mhddfs $out/bin/
+12
pkgs/tools/filesystems/mhddfs/fix-format-security-error.patch
··· 1 + --- mhddfs-0.1.39/src/usage.c.old 2017-02-28 15:00:25.435438622 +0100 2 + +++ mhddfs-0.1.39/src/usage.c 2017-02-28 15:00:33.847454958 +0100 3 + @@ -43,7 +43,7 @@ 4 + "\n" 5 + " see fusermount(1) for information about other options\n" 6 + ""; 7 + - fprintf(to, usage); 8 + + fputs(usage, to); 9 + if (to==stdout) exit(0); 10 + exit(-1); 11 + } 12 +