diff --git a/srcpkgs/runit/patches/chpst.patch b/srcpkgs/runit/patches/chpst.patch new file mode 100644 index 00000000000..988c731c4be --- /dev/null +++ b/srcpkgs/runit/patches/chpst.patch @@ -0,0 +1,14 @@ +Fix UB which breaks -n with negative values. +Ensure optarg is incremented strictly before it is read from. + +--- runit-2.1.2/src/chpst.c.orig ++++ runit-2.1.2/src/chpst.c +@@ -308,7 +308,7 @@ + case 'n': + switch (*optarg) { + case '-': +- if (optarg[scan_ulong(++optarg, &ul)]) usage(); nicelvl =ul; ++ ++optarg; if (optarg[scan_ulong(optarg, &ul)]) usage(); nicelvl =ul; + nicelvl *=-1; + break; + case '+': ++optarg; diff --git a/srcpkgs/runit/template b/srcpkgs/runit/template index ca74abaf177..f139517ab48 100644 --- a/srcpkgs/runit/template +++ b/srcpkgs/runit/template @@ -1,7 +1,7 @@ # Template file for 'runit' pkgname=runit version=2.1.2 -revision=12 +revision=13 build_wrksrc="${pkgname}-${version}/src" build_style="gnu-makefile" short_desc="UNIX init scheme with service supervision"